代码拉取完成,页面将自动刷新
From 71a94a18c470ebbd870253b8aedbb7b3b24a274b Mon Sep 17 00:00:00 2001
From: Jim Fehlig <[email protected]>
Date: Tue, 14 Jan 2020 15:08:54 -0700
Subject: [PATCH 14/19] vhostmd: Fix memory leak in parse_transports
From coverity scan
vhostmd-1.1/vhostmd/vhostmd.c:455: alloc_fn: Storage is returned from allocation function "xmlXPathEval".
vhostmd-1.1/vhostmd/vhostmd.c:455: var_assign: Assigning: "obj" = storage returned from "xmlXPathEval((xmlChar *)"//vhostmd/globals/transport", ctxt)".
vhostmd-1.1/vhostmd/vhostmd.c:474: leaked_storage: Variable "obj" going out of scope leaks the storage it points to.
472| #else
473| vu_log (VHOSTMD_ERR, "No support for xenstore transport in this vhostmd");
474|-> return -1;
475| #endif
476| }
Signed-off-by: Jim Fehlig <[email protected]>
---
vhostmd/vhostmd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/vhostmd/vhostmd.c b/vhostmd/vhostmd.c
index 7374ec9..3d1d53e 100644
--- a/vhostmd/vhostmd.c
+++ b/vhostmd/vhostmd.c
@@ -472,6 +472,7 @@ static int parse_transports(xmlDocPtr xml,
transports |= XENSTORE;
#else
vu_log (VHOSTMD_ERR, "No support for xenstore transport in this vhostmd");
+ xmlXPathFreeObject(obj);
return -1;
#endif
}
--
2.32.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。