rem: buf = 0;
context: char* received_builder(struct sip_msg *msg, unsigned int *received_len){	char *buf;	int  len;	struct ip_addr *source_ip;	char *tmp;	int  tmp_len;	int extra_len;	extra_len = 0;	source_ip=&msg->rcv.src_ip;	buf = 0;	buf=pkg_malloc(sizeof(char)*MAX_RECEIVED_SIZE);	if (buf==0){		ser_error=E_OUT_OF_MEM;		LOG(L_ERR, "ERROR: received_builder: out of memory\n");		return 0;	}	/*	received_len=snprintf(buf, MAX_RECEIVED_SIZE,							";received=%s",							inet_ntoa(*(struct in_addr *)&source_ip));	*/	memcpy(buf, RECEIVED, RECEIVED_LEN);	if ( (tmp=ip_addr2a(source_ip))==0)		return 0; /* error*/	tmp_len=strlen(tmp);	len=RECEIVED_LEN+tmp_len;	if(source_ip->af==AF_INET6){		len+=2;		buf[RECEIVED_LEN]='[';		buf[RECEIVED_LEN+tmp_len+1]=']';		extra_len=1;	}		memcpy(buf+RECEIVED_LEN+extra_len, tmp, tmp_len);	buf[len]=0; /*null terminate it */	*received_len = len;	return buf;}