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

Author: Anca Vamanu <[email protected]>
Committer: Anca Vamanu <[email protected]>
Date:   Wed Jun  6 15:49:57 2012 +0300

modules_k/registrar Fixed memory leak in reg_fetch_contacts()

---

 modules_k/registrar/regpv.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules_k/registrar/regpv.c b/modules_k/registrar/regpv.c
index 0452e57..bc45f3c 100644
--- a/modules_k/registrar/regpv.c
+++ b/modules_k/registrar/regpv.c
@@ -466,6 +466,7 @@ int pv_fetch_contacts(struct sip_msg* msg, char* table, 
char* uri,
                if(c0==NULL)
                {
                        LM_ERR("no more pkg\n");
+                       ul.release_urecord(r);
                        ul.unlock_udomain((udomain_t*)table, &aor);
                        goto error;
                }
@@ -517,6 +518,7 @@ int pv_fetch_contacts(struct sip_msg* msg, char* table, 
char* uri,
                ptr0 = c0;
                ptr = ptr->next;
        }
+       ul.release_urecord(r);
        ul.unlock_udomain((udomain_t*)table, &aor);
        rpp->nrc = n;
        LM_DBG("fetched <%d> contacts for <%.*s> in [%.*s]\n",


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

Reply via email to