[sr-dev] git:master: lib/ims: fixed pkg_mem leak when getting service route

Jason Penton jason.penton at gmail.com
Wed Feb 12 17:21:22 CET 2014


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

Author: Jason Penton <jason.penton at gmail.com>
Committer: Jason Penton <jason.penton at gmail.com>
Date:   Wed Feb 12 18:20:51 2014 +0200

lib/ims: fixed pkg_mem leak when getting service route

---

 lib/ims/ims_getters.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/ims/ims_getters.c b/lib/ims/ims_getters.c
index fb8598c..082a5c2 100644
--- a/lib/ims/ims_getters.c
+++ b/lib/ims/ims_getters.c
@@ -1334,8 +1334,8 @@ str* cscf_get_service_route(struct sip_msg *msg, int *size, int is_shm) {
 		while (h) {
 			if (h->name.len == 13
 					&& strncasecmp(h->name.s, "Service-Route", 13) == 0) {
-				h->parsed = 0;
 				r = (rr_t*) h->parsed;
+				h->parsed = 0;
 				free_rr(&r);
 			}
 			h = h->next;




More information about the sr-dev mailing list