MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / free_sip_msg

Function free_sip_msg

parser/msg_parser.c:965–992  ·  view source on GitHub ↗

Free only the content, not the msg structure itself * NOTE: the function doesn't do any cleanup/reset of the subfields */

Source from the content-addressed store, hash-verified

963/* Free only the content, not the msg structure itself
964 * NOTE: the function doesn't do any cleanup/reset of the subfields */
965void free_sip_msg(struct sip_msg* msg)
966{
967 if (msg->msg_cb)
968 msg_callback_process(msg, MSG_DESTROY, NULL);
969 if (msg->new_uri.s)
970 pkg_free(msg->new_uri.s);
971 if (msg->set_global_address.s)
972 pkg_free(msg->set_global_address.s);
973 if (msg->set_global_port.s)
974 pkg_free(msg->set_global_port.s);
975 if (msg->dst_uri.s)
976 pkg_free(msg->dst_uri.s);
977 if (msg->path_vec.s)
978 pkg_free(msg->path_vec.s);
979 if (msg->headers)
980 free_hdr_field_lst(msg->headers);
981 if (msg->add_rm)
982 free_lump_list(msg->add_rm);
983 if (msg->body_lumps)
984 free_lump_list(msg->body_lumps);
985 if (msg->sdp_ops )
986 free_sdp_ops(msg->sdp_ops);
987 if (msg->reply_lump)
988 free_reply_lump(msg->reply_lump);
989 if (msg->body )
990 free_sip_body(msg->body);
991 /* don't free anymore -- now a pointer to a static buffer */
992}
993
994
995/* make sure all HFs needed for transaction identification have been

Callers 15

receive_msgFunction · 0.85
release_dummy_sip_msgFunction · 0.85
__sl_reply_outFunction · 0.85
__tm_reply_outFunction · 0.85
topo_callid_pre_rawFunction · 0.85
topo_callid_post_rawFunction · 0.85
b2b_apply_lumpsFunction · 0.85
hep_msg_receivedFunction · 0.85
mc_decompressFunction · 0.85
buf_to_sip_msgFunction · 0.85
_reply_lightFunction · 0.85

Calls 6

msg_callback_processFunction · 0.85
free_hdr_field_lstFunction · 0.85
free_lump_listFunction · 0.85
free_sdp_opsFunction · 0.85
free_reply_lumpFunction · 0.85
free_sip_bodyFunction · 0.85

Tested by

no test coverage detected