浏览代码

corrected memory leak

Vaclav Kubart 19 年之前
父节点
当前提交
b4a0326c04
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      lib/xcap/pres_rules.c

+ 1 - 0
lib/xcap/pres_rules.c

@@ -77,6 +77,7 @@ int get_pres_rules(const char *xcap_root, const str_t *uri, xcap_query_t *xcap_p
 	if (res != RES_OK) {
 		DEBUG_LOG("XCAP problems for uri \'%s\'\n", xcap.uri ? xcap.uri: "???");
 		if (data) cds_free(data);
+		if (xcap.uri) cds_free(xcap.uri);
 		return RES_XCAP_QUERY_ERR;
 	}
 	if (xcap.uri) cds_free(xcap.uri);