rem: unlink_lump_rpl(trans->uas.request, hdr_lump); free_lump_rpl(hdr_lump);
add: if (hdr_lump) { unlink_lump_rpl(trans->uas.request, hdr_lump); free_lump_rpl(hdr_lump); }
context: static int send_reply(struct cell *trans, unsigned int code, str* text, str* body, str* headers, str* to_tag){	struct lump_rpl *hdr_lump, *body_lump;	str rpl;	int ret;	struct bookmark bm;	     /* mark the transaction as replied */	if (code >= 200) set_kr(REQ_RPLD);	     /* add the lumps for new_header and for body (by bogdan) */	hdr_lump = add_lump_rpl(trans->uas.request, headers->s, headers->len, LUMP_RPL_HDR);	if (!hdr_lump) {		LOG(L_ERR, "send_reply: cannot add hdr lump\n");		goto sr_error;	}	     /* body lump */	if (body && body->len) {		body_lump = add_lump_rpl(trans->uas.request, body->s, body->len, LUMP_RPL_BODY);		if (body_lump == 0) {			LOG(L_ERR,"send_reply: cannot add body lump\n");			goto sr_error_1;		}	} else {		body_lump = 0;	}	     /* We can safely zero-terminate the text here, because it is followed	      * by next line in the received message	      */	text->s[text->len] = '\0';	rpl.s = build_res_buf_from_sip_req(code, text->s, to_tag, trans->uas.request, (unsigned int*)&rpl.len, &bm);	     /* since the msg (trans->uas.request) is a clone into shm memory, to avoid	      * memory leak or crashing (lumps are create in private memory) I will	      * remove the lumps by myself here (bogdan) */	unlink_lump_rpl(trans->uas.request, hdr_lump);	free_lump_rpl(hdr_lump);	if (body_lump) {		unlink_lump_rpl(trans->uas.request, body_lump);		free_lump_rpl(body_lump);	}	if (rpl.s == 0) {		LOG(L_ERR,"send_reply: failed in build_res_buf_from_sip_req\n");		goto sr_error;	}	ret = _reply_light(trans, rpl.s, rpl.len, code, text->s,  to_tag->s, to_tag->len, 1 /* lock replies */, &bm);	     /* this is ugly hack -- the function caller may wish to continue with	      * transction and I unref; however, there is now only one use from	      * vm/fifo_vm_reply and I'm currently to lazy to export UNREF; -jiri	      */	UNREF(trans);	return ret; sr_error_1:	unlink_lump_rpl(trans->uas.request, hdr_lump);	free_lump_rpl(hdr_lump); sr_error:	return -1;}