diff --git a/ChangeLog b/ChangeLog index e5e33552a3..f295e7e9d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 11 10:43:25 CEST 2007 Daniel Veillard + + * src/xml.c: patch from Masayuki Sunou fixing leaks in + virDomainParseXMLDiskDesc + Mon Jul 9 14:24:12 CEST 2007 Daniel Veillard * configure.in libvirt.spec.in include/libvirt/libvirt.h diff --git a/NEWS b/NEWS index 8199375c43..ee5948c9d9 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,48 @@ http://libvirt.org/news.html Releases +0.3.0: Jul 9 2007: + - Secure Remote support (Richard Jones). + See the remote page + of the documentation + + - Documentation: remote support (Richard Jones), description of + the URI connection strings (Richard Jones), update of virsh man + page, matrix of libvirt API/hypervisor support with version + informations (Richard Jones) + - Bug fixes: examples Makefile.am generation (Richard Jones), + SetMem fix (Mark Johnson), URI handling and ordering of + drivers (Daniel Berrange), fix virsh help without hypervisor (Richard + Jones), id marshalling fix (Daniel Berrange), fix virConnectGetMaxVcpus + on remote (Richard Jones), avoid a realloc leak (Jim Meyering), scheduler + parameters handling for Xen (Richard Jones), various early remote + bug fixes (Richard Jones), remove virsh leaks of domains references + (Masayuki Sunou), configCache refill bug (Richard Jones), fix + XML serialization bugs + - Improvements: QEmu switch to XDR-based protocol (Dan Berrange), + device attach/detach commands (Masayuki Sunou), OCaml bindings + (Richard Jones), new entry points virDomainGetConnect and + virNetworkGetConnect useful for bindings (Richard Jones), + reunitifaction of remote and qemu daemon under a single libvirtd + with a config file (Daniel Berrange) + - Cleanups: parsing of connection URIs (Richard Jones), messages + from virsh (Saori Fukuta), Coverage files (Daniel Berrange), + Solaris fixes (Mark Johnson), avoid [r]index calls (Richard Jones), + release information in Xen backend, virsh cpupin command cleanups + (Masayuki Sunou), xen:/// suppport as standard Xen URI (Richard Jones and + Daniel Berrange), improve driver selection/decline mechanism (Richard + Jones), error reporting on XML dump (Richard Jones), Remove unused + virDomainKernel structure (Richard Jones), daemon event loop event + handling (Daniel Berrange), various unifications cleanup in the daemon + merging (Daniel Berrange), internal file and timer monitoring API + (Daniel Berrange), remove libsysfs dependancy, call brctl program + directly (Daniel Berrange), virBuffer functions cleanups (Richard Jones), + make init script LSB compliant, error handling on lookup functions + (Richard Jones), remove internal virGetDomainByID (Richard Jones), + revamp of xen subdrivers interfaces (Richard Jones) + - Localization updates + + 0.2.3: Jun 8 2007: - Documentation: documentation for upcoming remote access (Richard Jones), virConnectNumOfDefinedDomains doc (Jan Michael), virsh help messages diff --git a/src/xml.c b/src/xml.c index 52c186788c..7c2f16bd52 100644 --- a/src/xml.c +++ b/src/xml.c @@ -719,6 +719,7 @@ virDomainParseXMLDiskDesc(virConnectPtr conn, xmlNodePtr node, virBufferPtr buf, int typ = 0; int cdrom = 0; int isNoSrcCdrom = 0; + int ret = 0; type = xmlGetProp(node, BAD_CAST "type"); if (type != NULL) { @@ -768,21 +769,14 @@ virDomainParseXMLDiskDesc(virConnectPtr conn, xmlNodePtr node, virBufferPtr buf, } if (!isNoSrcCdrom) { virXMLError(conn, VIR_ERR_NO_SOURCE, (const char *) target, 0); - - if (target != NULL) - xmlFree(target); - if (device != NULL) - xmlFree(device); - return (-1); + ret = -1; + goto cleanup; } } if (target == NULL) { virXMLError(conn, VIR_ERR_NO_TARGET, (const char *) source, 0); - if (source != NULL) - xmlFree(source); - if (device != NULL) - xmlFree(device); - return (-1); + ret = -1; + goto cleanup; } /* Xend (all versions) put the floppy device config @@ -861,12 +855,17 @@ virDomainParseXMLDiskDesc(virConnectPtr conn, xmlNodePtr node, virBufferPtr buf, virBufferAdd(buf, ")", 1); cleanup: - xmlFree(drvType); - xmlFree(drvName); - xmlFree(device); - xmlFree(target); - xmlFree(source); - return (0); + if(drvType) + xmlFree(drvType); + if(drvName) + xmlFree(drvName); + if(device) + xmlFree(device); + if(target) + xmlFree(target); + if(source) + xmlFree(source); + return (ret); } /**