From: Alex Jia Date: Sat, 29 Oct 2011 17:12:56 +0000 (+0800) Subject: qemu: plug memory leak X-Git-Tag: v0.9.7~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=381de903751170f04809b7a2624400545d793153;p=thirdparty%2Flibvirt.git qemu: plug memory leak Detected by Coverity. Leak introduced in commit 6cabc0b. * src/qemu/qemu_command.c: Clean up on failure. Signed-off-by: Alex Jia --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 09364929c7..02958cbdb1 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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;