mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +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;
|
||||
qemuMonitorPtr mon = NULL;
|
||||
int major, minor, micro;
|
||||
char *package;
|
||||
char *package = NULL;
|
||||
int status = 0;
|
||||
virDomainChrSourceDef config;
|
||||
char *monarg = NULL;
|
||||
@ -2442,6 +2442,7 @@ cleanup:
|
||||
virCommandFree(cmd);
|
||||
VIR_FREE(monarg);
|
||||
VIR_FREE(monpath);
|
||||
VIR_FREE(package);
|
||||
|
||||
if (pidfile) {
|
||||
char ebuf[1024];
|
||||
|
Loading…
Reference in New Issue
Block a user