Module: kamailio Branch: 5.0 Commit: a4d26dfde58d5e038ed53c315bbd6e7b353211fc URL: https://github.com/kamailio/kamailio/commit/a4d26dfde58d5e038ed53c315bbd6e7b...
Author: Victor Seva linuxmaniac@torreviejawireless.org Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2017-06-09T23:53:14+02:00
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
(cherry picked from commit cca31b30aeb80c808b10c5f4f36285c1c55cd72a)
---
Modified: src/core/parser/msg_parser.c
---
Diff: https://github.com/kamailio/kamailio/commit/a4d26dfde58d5e038ed53c315bbd6e7b... Patch: https://github.com/kamailio/kamailio/commit/a4d26dfde58d5e038ed53c315bbd6e7b...
---
diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c index aaeb642517..bbd5062250 100644 --- a/src/core/parser/msg_parser.c +++ b/src/core/parser/msg_parser.c @@ -795,13 +795,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; }