add: goto error; } s_ip.len = strlen(s_ip.s); avp_val.s = &s_ip; } else if (src->flags&AVPOPS_USE_DST_IP) {  if ( (s_ip.s=ip_addr2a( &msg->rcv.dst_ip ))==0) { LOG(L_ERR,"ERROR:avpops:write_avp: cannot get dst_ip\n");
context: int ops_write_avp(struct sip_msg* msg, struct fis_param *src,													struct fis_param *ap){	struct sip_uri uri;	int_str avp_val;	unsigned short flags;	str s_ip;	if (src->flags&AVPOPS_VAL_NONE)	{		if (src->flags&AVPOPS_USE_SRC_IP)		{			/* get data from src_ip */			if ( (s_ip.s=ip_addr2a( &msg->rcv.src_ip ))==0)			{				LOG(L_ERR,"ERROR:avpops:write_avp: cannot get src_ip\n");				goto error;			}			s_ip.len = strlen(s_ip.s);			avp_val.s = &s_ip;		} else if (src->flags&(AVPOPS_USE_HDRREQ|AVPOPS_USE_HDRRPL)) {			/* get data from hdr */			if ( (avp_val.s=search_hdr(msg,src))==0 ) {				DBG("DEBUG:avpops:write_avp: hdr not found\n");				goto error;			}		} else {			/* get data from uri (from,to,ruri) */			if (src->flags&(AVPOPS_FLAG_USER|AVPOPS_FLAG_DOMAIN))			{				if (parse_source_uri( msg, src->flags, &uri)!=0 )				{					LOG(L_ERR,"ERROR:avpops:write_avp: cannot parse uri\n");					goto error;				}				if (src->flags&AVPOPS_FLAG_DOMAIN)					avp_val.s = &uri.host;				else					avp_val.s = &uri.user;			} else {				/* get whole uri */				if ( (avp_val.s=get_source_uri(msg,src->flags))==0 )				{					LOG(L_ERR,"ERROR:avpops:write_avp: cannot get uri\n");					goto error;				}			}		}		flags = AVP_VAL_STR;	} else {		avp_val = src->val;		flags = (src->flags&AVPOPS_VAL_INT)?0:AVP_VAL_STR;	}	/* set the proper flag */	flags |=  (ap->flags&AVPOPS_VAL_INT)?0:AVP_NAME_STR;	/* added the avp */	if (add_avp( flags, ap->val, avp_val)<0)		goto error;	return 1;error:	return -1;}