mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
Fix memory leak in QEMU QMP capabilities initialization
The qemuCapsInitQMP method never frees the QEMU 'package' version string.
This commit is contained in:
parent
cc5c7f9865
commit
f6bd0a8899
@ -2298,7 +2298,7 @@ qemuCapsInitQMP(qemuCapsPtr caps,
|
|||||||
virCommandPtr cmd = NULL;
|
virCommandPtr cmd = NULL;
|
||||||
qemuMonitorPtr mon = NULL;
|
qemuMonitorPtr mon = NULL;
|
||||||
int major, minor, micro;
|
int major, minor, micro;
|
||||||
char *package;
|
char *package = NULL;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
virDomainChrSourceDef config;
|
virDomainChrSourceDef config;
|
||||||
char *monarg = NULL;
|
char *monarg = NULL;
|
||||||
@ -2442,6 +2442,7 @@ cleanup:
|
|||||||
virCommandFree(cmd);
|
virCommandFree(cmd);
|
||||||
VIR_FREE(monarg);
|
VIR_FREE(monarg);
|
||||||
VIR_FREE(monpath);
|
VIR_FREE(monpath);
|
||||||
|
VIR_FREE(package);
|
||||||
|
|
||||||
if (pidfile) {
|
if (pidfile) {
|
||||||
char ebuf[1024];
|
char ebuf[1024];
|
||||||
|
Loading…
Reference in New Issue
Block a user