Module: kamailio Branch: master Commit: 61435f40f0f4ca25521f7f1b8515e47954a69b2d URL: https://github.com/kamailio/kamailio/commit/61435f40f0f4ca25521f7f1b8515e47954a69b2d
Author: sergey-vb <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2016-04-28T22:42:51+02:00 textops: fix memory leak in when converting body to multipart with set_body_multipart() --- Modified: modules/textops/textops.c --- Diff: https://github.com/kamailio/kamailio/commit/61435f40f0f4ca25521f7f1b8515e47954a69b2d.diff Patch: https://github.com/kamailio/kamailio/commit/61435f40f0f4ca25521f7f1b8515e47954a69b2d.patch --- diff --git a/modules/textops/textops.c b/modules/textops/textops.c index 74d7726..400b836 100644 --- a/modules/textops/textops.c +++ b/modules/textops/textops.c @@ -1763,6 +1763,8 @@ int set_multibody_helper(struct sip_msg* msg, char* p1, char* p2, char* p3) } pkg_free(nbb); if(nc.s!=NULL) pkg_free(nc.s); + if(convert && nb.s!=NULL) pkg_free(nb.s); + if(convert && oc.s!=NULL) pkg_free(oc.s); LM_DBG("set flag FL_BODY_MULTIPART\n"); msg->msg_flags |= FL_BODY_MULTIPART; return 1; _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
