Free only the content, not the msg structure itself * NOTE: the function doesn't do any cleanup/reset of the subfields */
| 963 | /* Free only the content, not the msg structure itself |
| 964 | * NOTE: the function doesn't do any cleanup/reset of the subfields */ |
| 965 | void 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 |
no test coverage detected