mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
src/libvirt.c (do_open): Avoid double-free upon failure.
This commit is contained in:
parent
218f866f86
commit
6997b1920f
@ -1,5 +1,7 @@
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user