diff --git a/src/modules/pua_reginfo/notify.c b/src/modules/pua_reginfo/notify.c index 317f3e8811c..853dbcc878e 100644 --- a/src/modules/pua_reginfo/notify.c +++ b/src/modules/pua_reginfo/notify.c @@ -458,7 +458,7 @@ int process_body(str notify_body, udomain_t * domain) { } } next_registration: - // if (ul_record) ul.release_urecord(ul_record); + if (ul_record) ul.release_urecord(ul_record); /* Unlock the domain for this AOR: */ if (aor_key.len > 0) ul.unlock_udomain(domain, &aor_key); diff --git a/src/modules/pua_reginfo/usrloc_cb.c b/src/modules/pua_reginfo/usrloc_cb.c index 7f84788acb9..3e00a0eaed8 100644 --- a/src/modules/pua_reginfo/usrloc_cb.c +++ b/src/modules/pua_reginfo/usrloc_cb.c @@ -223,7 +223,7 @@ void reginfo_usrloc_cb(ucontact_t* c, int type, void* param) { publ_info_t publ; str content_type; udomain_t * domain; - urecord_t * record; + urecord_t * record = NULL; int res; str uri = {NULL, 0}; str user = {NULL, 0}; @@ -332,6 +332,7 @@ void reginfo_usrloc_cb(ucontact_t* c, int type, void* param) { if(body->s) xmlFree(body->s); pkg_free(body); } + if(record) ul.release_urecord(record); return; }