if (response->data == NULL) {
if (response->data == NULL && response->len != 0) {
CMTStatus CMT_ReceiveMessage(PCMT_CONTROL control, CMTItem * response){    CMTMessageHeader header;    CMUint32 numread;    /* Get the message header */    numread = CMT_ReadThisMany(control, control->sock,                             (void *)&header, sizeof(CMTMessageHeader));    if (numread != sizeof(CMTMessageHeader)) {        goto loser;    }    response->type = ntohl(header.type);    response->len = ntohl(header.len);    response->data = (unsigned char *) malloc(response->len);    if (response->data == NULL) {        goto loser;    }    numread = CMT_ReadThisMany(control, control->sock,                             (void *)(response->data), response->len);     if (numread != response->len) {        goto loser;    }#ifdef PRINT_RECEIVE_MESSAGES    LOG("About to print message received from PSM.\n");    prettyPrintMessage(response);#endif /*PRINT_RECEIVE_MESSAGES*/    return CMTSuccess;loser:    if (response->data) {        free(response->data);    }    return CMTFailure;}