Module: sip-router
Branch: master
Commit: b2d4efa0e261fe125c317f129f1836e2dabfc208
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b2d4efa…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)gmail.com>
Date: Tue Nov 11 15:15:32 2014 +0200
modules/ims_usrloc_scscf: Fixed pkg_memory - not freeing DB_RES
---
modules/ims_usrloc_scscf/udomain.c | 16 ++++++++--------
modules/ims_usrloc_scscf/usrloc_db.c | 2 ++
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/modules/ims_usrloc_scscf/udomain.c b/modules/ims_usrloc_scscf/udomain.c
index bb42cf6..98ebaac 100644
--- a/modules/ims_usrloc_scscf/udomain.c
+++ b/modules/ims_usrloc_scscf/udomain.c
@@ -343,14 +343,14 @@ void mem_timer_udomain(udomain_t* _d) {
ptr = ptr->next;
timer_impurecord(t);
- if (t->reg_state == IMPU_NOT_REGISTERED && t->shead == 0) {
- //remove it - housekeeping - not sure why its still here...?
- if (exists_ulcb_type(t->cbs, UL_IMPU_NR_DELETE))
- run_ul_callbacks(t->cbs, UL_IMPU_NR_DELETE, t, NULL);
-
- LM_DBG("about to delete impurecord\n");
- delete_impurecord(_d, &t->public_identity, t);
- } //else if (t->reg_state == IMPU_UNREGISTERED) {//Remove IMPU record if it is
in state IMPU_UNREGISTERED and has expired
+// if (t->reg_state == IMPU_NOT_REGISTERED && t->shead == 0) {
+// //remove it - housekeeping - not sure why its still here...?
+// if (exists_ulcb_type(t->cbs, UL_IMPU_NR_DELETE))
+// run_ul_callbacks(t->cbs, UL_IMPU_NR_DELETE, t, NULL);
+//
+// LM_DBG("about to delete impurecord\n");
+// delete_impurecord(_d, &t->public_identity, t);
+// } //else if (t->reg_state == IMPU_UNREGISTERED) {//Remove IMPU record if it
is in state IMPU_UNREGISTERED and has expired
//
// if (time_now >= t->expires) {//check here and only remove if no
subscribes - if there is a subscribe then bump the validity by unreg_validity
// if(t->shead != 0){
diff --git a/modules/ims_usrloc_scscf/usrloc_db.c b/modules/ims_usrloc_scscf/usrloc_db.c
index b83504d..2052d81 100644
--- a/modules/ims_usrloc_scscf/usrloc_db.c
+++ b/modules/ims_usrloc_scscf/usrloc_db.c
@@ -946,6 +946,7 @@ int db_link_contact_to_impu(impurecord_t* _r, ucontact_t* _c) {
LM_ERR("Unable to link impu-contact in DB - impu [%.*s], contact [%.*s]\n",
_r->public_identity.len, _r->public_identity.s, _c->c.len, _c->c.s);
return -1;
}
+ ul_dbf.free_result(ul_dbh, rs);
LM_DBG("Query success\n");
return 0;
@@ -979,6 +980,7 @@ int db_unlink_contact_from_impu(impurecord_t* _r, ucontact_t* _c) {
LM_ERR("Unable to un-link impu-contact in DB - impu [%.*s], contact [%.*s]\n",
_r->public_identity.len, _r->public_identity.s, _c->c.len, _c->c.s);
return -1;
}
+ ul_dbf.free_result(ul_dbh, rs);
LM_DBG("Delete query success\n");
return 0;