Module: kamailio
Branch: 5.1
Commit: 730fad39599c39b1a5c3faa1d9bb9c49db61439b
URL:
https://github.com/kamailio/kamailio/commit/730fad39599c39b1a5c3faa1d9bb9c4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-01-22T11:26:19+01:00
rls: rls_get_service_list() - set to NULL the content of rootdoc pointer
- its a function parameter and expects to be set by the function
(cherry picked from commit 5e58d48c980f5e413f47271dd342ee0630722bbb)
---
Modified: src/modules/rls/subscribe.c
---
Diff:
https://github.com/kamailio/kamailio/commit/730fad39599c39b1a5c3faa1d9bb9c4…
Patch:
https://github.com/kamailio/kamailio/commit/730fad39599c39b1a5c3faa1d9bb9c4…
---
diff --git a/src/modules/rls/subscribe.c b/src/modules/rls/subscribe.c
index c895bd1a93..9222dc72b8 100644
--- a/src/modules/rls/subscribe.c
+++ b/src/modules/rls/subscribe.c
@@ -272,12 +272,10 @@ int rls_get_service_list(str *service_uri, str *user, str *domain,
LM_DBG("service uri %.*s not found in rl document for user"
" sip:%.*s@%.*s\n", service_uri->len, service_uri->s,
user->len, user->s, domain->len, domain->s);
- rootdoc = NULL;
if(xmldoc!=NULL)
xmlFreeDoc(xmldoc);
- }
- else
- {
+ *rootdoc = NULL;
+ } else {
*rootdoc = xmldoc;
}
@@ -290,8 +288,6 @@ int rls_get_service_list(str *service_uri, str *user, str *domain,
error:
if(result!=NULL)
rls_xcap_dbf.free_result(rls_xcap_db, result);
- if(xmldoc!=NULL)
- xmlFreeDoc(xmldoc);
if(xcapdoc!=NULL)
pkg_free(xcapdoc);