mirror of https://gitee.com/openkylin/libvirt.git
qemu: fix memory leak on -machine usage error
Commit f84b92ea
introduced a memory leak on error; John Ferlan reported
that valgrind caught it during 'make check'.
* src/qemu/qemu_command.c (qemuBuildMachineArgStr): Plug leak.
This commit is contained in:
parent
fc8c1787d8
commit
e52a31d166
|
@ -5228,6 +5228,7 @@ qemuBuildMachineArgStr(virCommandPtr cmd,
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("dump-guest-core is not available "
|
_("dump-guest-core is not available "
|
||||||
"with this QEMU binary"));
|
"with this QEMU binary"));
|
||||||
|
virBufferFreeAndReset(&buf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue