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 <ajia@redhat.com>
This commit is contained in:
Alex Jia 2011-10-30 01:12:56 +08:00 committed by Eric Blake
parent d3505ba895
commit 381de90375

View 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;