From: John Ferlan Date: Wed, 27 Aug 2014 18:32:27 +0000 (-0400) Subject: qemu_command: Resolve Coverity RESOURCE_LEAK X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=461fb5559969c9f8792cff449250eecaf36e4073;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git qemu_command: Resolve Coverity RESOURCE_LEAK In qemuParseISCSIString() if an error was returned, then the call to qemuParseDriveURIString() where the uri is free'd wouldn't be run --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8fb81a435..528f947fa 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2795,6 +2795,7 @@ qemuParseISCSIString(virDomainDiskDefPtr def) virReportError(VIR_ERR_INTERNAL_ERROR, _("invalid name '%s' for iSCSI disk"), def->src->path); + virURIFree(uri); return -1; } }