Browse code

presence_xml: free uri for http xcap auth

(cherry picked from commit eba6c7d78088cde411f5cd1b7730ba458e62a69e)

Daniel-Constantin Mierla authored on 28/04/2022 12:03:55
Showing 1 changed files
... ...
@@ -521,7 +521,7 @@ error:
521 521
 
522 522
 int http_get_rules_doc(str user, str domain, str *rules_doc)
523 523
 {
524
-	str uri;
524
+	str uri = STR_NULL;
525 525
 	xcap_doc_sel_t doc_sel;
526 526
 	char *doc = NULL;
527 527
 	xcap_serv_t *xs;
... ...
@@ -559,6 +559,8 @@ int http_get_rules_doc(str user, str domain, str *rules_doc)
559 559
 	rules_doc->s = doc;
560 560
 	rules_doc->len = doc ? strlen(doc) : 0;
561 561
 
562
+	pkg_free(uri.s);
563
+
562 564
 	return 0;
563 565
 
564 566
 error: