提交 28dd54a5 编写于 作者: M Marc Hartmayer 提交者: Laine Stump

conf: Fix libvirtd free() segfault if virDomainChrSourceDefNew(...) fails

If virDomainChrSourceDefNew(xmlopt) fails, it will lead to free()ing
the uninitialized pointer bus. The fix for this is to initialize bus
with NULL.
Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
上级 62b2c2fc
......@@ -13317,7 +13317,7 @@ virDomainRedirdevDefParseXML(virDomainXMLOptionPtr xmlopt,
{
xmlNodePtr cur;
virDomainRedirdevDefPtr def;
char *bus, *type = NULL;
char *bus = NULL, *type = NULL;
int remaining;
if (VIR_ALLOC(def) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册