]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: plug memory leak
authorAlex Jia <ajia@redhat.com>
Sat, 29 Oct 2011 17:12:56 +0000 (01:12 +0800)
committerEric Blake <eblake@redhat.com>
Mon, 31 Oct 2011 17:20:30 +0000 (11:20 -0600)
Detected by Coverity. Leak introduced in commit 6cabc0b.

* src/qemu/qemu_command.c: Clean up on failure.

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

index 09364929c739b290720f03356fea76bd64d255ac..02958cbdb197bdffd5f7aab7fb7c9eedcf74ba0d 100644 (file)
@@ -4995,6 +4995,7 @@ qemuBuildCommandLine(virConnectPtr conn,
                 }
 
                 if (sound->model == VIR_DOMAIN_SOUND_MODEL_ICH6) {
+                    VIR_FREE(modstr);
                     qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                                     _("this QEMU binary lacks hda support"));
                     goto error;