]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu_command: Resolve Coverity RESOURCE_LEAK
authorJohn Ferlan <jferlan@redhat.com>
Wed, 27 Aug 2014 18:32:27 +0000 (14:32 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 28 Aug 2014 12:12:16 +0000 (08:12 -0400)
In qemuParseISCSIString() if an error was returned, then the call
to qemuParseDriveURIString() where the uri is free'd wouldn't be run

src/qemu/qemu_command.c

index 8fb81a43562630a4e7db5ba84cc07a73de30519d..528f947fa560107976fc2338f762759dc5b50142 100644 (file)
@@ -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;
         }
     }