瀏覽代碼

presence_xml: free uri for http xcap auth

Daniel-Constantin Mierla 3 年之前
父節點
當前提交
eba6c7d780
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/modules/presence_xml/xcap_auth.c

+ 3 - 1
src/modules/presence_xml/xcap_auth.c

@@ -521,7 +521,7 @@ error:
 
 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: