rem: return insert_new_lump_after(l, s, len, 0)?1:-1;
add: if (insert_new_lump_after(l, s, len, 0)==0){ LOG(L_ERR, "ERROR: could not insert new lump\n"); pkg_free(s); return -1; } return 1;
context: static int search_append_f(struct sip_msg* msg, char* key, char* str){	struct lump* l;	regmatch_t pmatch;	char* s;	int len;	if (regexec((regex_t*) key, msg->orig, 1, &pmatch, 0)!=0) return -1;	if (pmatch.rm_so!=-1){		if ((l=anchor_lump(&msg->add_rm, pmatch.rm_eo, 0, 0))==0)			return -1;		len=strlen(str);		s=pkg_malloc(len);		if (s==0){			LOG(L_ERR, "ERROR: search_append_f: mem. allocation failure\n");			return -1;		}		memcpy(s, str, len); 		return insert_new_lump_after(l, s, len, 0)?1:-1;	}	return -1;}