diff --git a/debian/patches/series b/debian/patches/series index 69c74a4a7..188afc759 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -54,5 +54,6 @@ sipwise/sca-fix-sca_call_info_update-params.patch sipwise/sca-use-onhold_bflag-value-only-when-set.patch ## sipwise/tm-deep-cloning-of-the-request-for-fake-environment.patch +sipwise/core-parser-reset_path_vector-remove-check-for-msg-m.patch sipwise/pv_trans_eval_uri.patch sipwise/rtpengine-mos-stats.patch diff --git a/debian/patches/sipwise/core-parser-reset_path_vector-remove-check-for-msg-m.patch b/debian/patches/sipwise/core-parser-reset_path_vector-remove-check-for-msg-m.patch new file mode 100644 index 000000000..55dc5a5b9 --- /dev/null +++ b/debian/patches/sipwise/core-parser-reset_path_vector-remove-check-for-msg-m.patch @@ -0,0 +1,32 @@ +From: Victor Seva +Date: Fri, 2 Jun 2017 10:19:25 +0200 +Subject: core: parser reset_path_vector() remove check for msg->msg_flags + +* tm now uses shared memory for fake_req() so faked_req->path_vec +was leaking +--- + parser/msg_parser.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/parser/msg_parser.c b/parser/msg_parser.c +index 8b21178..c1df41b 100644 +--- a/parser/msg_parser.c ++++ b/parser/msg_parser.c +@@ -790,13 +790,11 @@ int set_path_vector(struct sip_msg* msg, str* path) + + void reset_path_vector(struct sip_msg* const msg) + { +- /* only free path vector from pkg IFF it is still in pkg... - ie. if msg is shm we don't free... */ +- if (!(msg->msg_flags&FL_SHM_CLONE)) { +- if (msg->path_vec.s) +- pkg_free(msg->path_vec.s); +- msg->path_vec.s = 0; +- msg->path_vec.len = 0; ++ if (msg->path_vec.s) { ++ pkg_free(msg->path_vec.s); + } ++ msg->path_vec.s = 0; ++ msg->path_vec.len = 0; + } + +