提交 6997b192 编写于 作者: J Jim Meyering

src/libvirt.c (do_open): Avoid double-free upon failure.

上级 218f866f
Wed Jan 30 20:49:34 CET 2008 Jim Meyering <meyering@redhat.com>
* src/libvirt.c (do_open): Avoid double-free upon failure.
Avoid segfault upon malloc failure, and plug a leak.
* src/test.c (testDomainSave): Detect testDomainDumpXML failure.
Free "xml".
......
......@@ -615,7 +615,6 @@ do_open (const char *name,
return ret;
failed:
free (ret->name);
if (ret->driver) ret->driver->close (ret);
if (uri) xmlFreeURI(uri);
virUnrefConnect(ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册