Module: kamailio
Branch: master
Commit: 105376bea7de217d58f3558b8da0244d1f499ec5
URL:
https://github.com/kamailio/kamailio/commit/105376bea7de217d58f3558b8da0244…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2017-06-02T10:34:27+02:00
Merge pull request #1144 from linuxmaniac/vseva/fix_tm_leak
core: parser reset_path_vector() remove check for msg->msg_flags
---
Modified: src/core/parser/msg_parser.c
---
Diff:
https://github.com/kamailio/kamailio/commit/105376bea7de217d58f3558b8da0244…
Patch:
https://github.com/kamailio/kamailio/commit/105376bea7de217d58f3558b8da0244…
---
diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c
index e8c990da9f..2a4f2bb593 100644
--- a/src/core/parser/msg_parser.c
+++ b/src/core/parser/msg_parser.c
@@ -799,13 +799,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;
}