diff --git a/ChangeLog b/ChangeLog index 8b26a4b8dad236fe6ff822bba6c602bb071aced4..41629f032dd29b6e4f9dbe8967572fcb789805ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ Wed Jan 30 20:49:34 CET 2008 Jim Meyering + * 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". diff --git a/src/libvirt.c b/src/libvirt.c index defadc19ef7ee554ec279a1d6b584ac43f9f99fa..c19565fd4ed371847e509c31a043281052ddfa47 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -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);