]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: avoid memory leak
authorajia@redhat.com <ajia@redhat.com>
Sun, 18 Sep 2011 16:36:11 +0000 (00:36 +0800)
committerEric Blake <eblake@redhat.com>
Mon, 19 Sep 2011 19:23:53 +0000 (13:23 -0600)
Leak introduced in commit 036ad50, affects only error case.

* src/qemu/qemu_command.c: fix memory leak.

Signed-off-by: Alex Jia <ajia@redhat.com>
src/qemu/qemu_command.c

index e8b1157c9059e81d2b2370a1bfa7657599c050d3..45d55fc50814ca196f9f3a6f628c26a5931209e1 100644 (file)
@@ -6540,7 +6540,6 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
                     host = disk->src;
                     port = strchr(host, ':');
                     if (!port) {
-                        def = NULL;
                         qemuReportError(VIR_ERR_INTERNAL_ERROR,
                                         _("cannot parse nbd filename '%s'"), disk->src);
                         goto error;