Module: sip-router
Branch: 3.1
Commit: 895bb02ffb9f07b3e24a1edb59358f6412122d6f
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=895bb02…
Author: Anca Vamanu <anca.vamanu(a)1and1.ro>
Committer: Anca Vamanu <anca.vamanu(a)1and1.ro>
Date: Wed Jun 6 15:49:57 2012 +0300
modules_k/registrar Fixed memory leak in reg_fetch_contacts()
(cherry picked from commit ac28b3b8dd34cfac290f1941a575841261c9ed97)
---
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 60e8c1f..aceb502 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",