[sr-dev] git:master:eba6c7d7: presence_xml: free uri for http xcap auth

Daniel-Constantin Mierla miconda at gmail.com
Thu Apr 28 14:04:30 CEST 2022


Module: kamailio
Branch: master
Commit: eba6c7d78088cde411f5cd1b7730ba458e62a69e
URL: https://github.com/kamailio/kamailio/commit/eba6c7d78088cde411f5cd1b7730ba458e62a69e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-04-28T14:03:55+02:00

presence_xml: free uri for http xcap auth

---

Modified: src/modules/presence_xml/xcap_auth.c

---

Diff:  https://github.com/kamailio/kamailio/commit/eba6c7d78088cde411f5cd1b7730ba458e62a69e.diff
Patch: https://github.com/kamailio/kamailio/commit/eba6c7d78088cde411f5cd1b7730ba458e62a69e.patch

---

diff --git a/src/modules/presence_xml/xcap_auth.c b/src/modules/presence_xml/xcap_auth.c
index 0cf0669ca1..c40f0a899e 100644
--- a/src/modules/presence_xml/xcap_auth.c
+++ b/src/modules/presence_xml/xcap_auth.c
@@ -521,7 +521,7 @@ int get_rules_doc(
 
 int http_get_rules_doc(str user, str domain, str *rules_doc)
 {
-	str uri;
+	str uri = STR_NULL;
 	xcap_doc_sel_t doc_sel;
 	char *doc = NULL;
 	xcap_serv_t *xs;
@@ -559,6 +559,8 @@ int http_get_rules_doc(str user, str domain, str *rules_doc)
 	rules_doc->s = doc;
 	rules_doc->len = doc ? strlen(doc) : 0;
 
+	pkg_free(uri.s);
+
 	return 0;
 
 error:




More information about the sr-dev mailing list