dst->data = (unsigned char*)PORT_Realloc(dst->data, dst->len + numBytes);
unsigned char * p = dst->data; dst->data = (unsigned char*)PORT_Realloc(p, dst->len + numBytes); if (!dst->data) { PORT_Free(p); }
secu_StdinToItem(SECItem *dst){    unsigned char buf[1000];    PRInt32 numBytes;    PRBool notDone = PR_TRUE;    dst->len = 0;    dst->data = NULL;    while (notDone) {	numBytes = PR_Read(PR_STDIN, buf, sizeof(buf));	if (numBytes < 0) {	    return SECFailure;	}	if (numBytes == 0)	    break;	if (dst->data) {	    /* XXX if PORT_Realloc fails, the old buffer is leaked. */	    dst->data = (unsigned char*)PORT_Realloc(dst->data, 	                                             dst->len + numBytes);	} else {	    dst->data = (unsigned char*)PORT_Alloc(numBytes);	}	if (!dst->data) {	    return SECFailure;	}	PORT_Memcpy(dst->data + dst->len, buf, numBytes);	dst->len += numBytes;    }    return SECSuccess;}