Module: sip-router
Branch: 3.2
Commit: b9726b9fb4538c74ce898c28fdee962f2cf22853
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b9726b9…
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 7f5f8ec..119d483 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",