Module: sip-router
Branch: master
Commit: f15de29015546d173a1d3135f90653e05d85171f
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f15de29015546d173a1d3135f90653e05d85171f

Author: Jason Penton <[email protected]>
Committer: Jason Penton <[email protected]>
Date:   Mon Mar 10 14:38:51 2014 +0200

modules/corex: only free path_vector from pkg if it is still in pkg... not shm 
cloned
        - related to earlier commit 4ab0f53ff247f411dde7b88d5b7d82fc7e17baa9

---

 modules/corex/corex_lib.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/corex/corex_lib.c b/modules/corex/corex_lib.c
index 9d926c2..f83352b 100644
--- a/modules/corex/corex_lib.c
+++ b/modules/corex/corex_lib.c
@@ -84,7 +84,8 @@ int corex_append_branch(sip_msg_t *msg, gparam_t *pu, 
gparam_t *pq)
                msg->dst_uri.s = 0;
                msg->dst_uri.len = 0;
                if(msg->path_vec.s!=0)
-                       pkg_free(msg->path_vec.s);
+                       if (likely(msg->path_vec.s >= msg->buf && 
(msg->path_vec.s < (msg->buf + msg->len))))
+                               pkg_free(msg->path_vec.s);
                msg->path_vec.s = 0;
                msg->path_vec.len = 0;
        }


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to