Fix memory leak in QEMU QMP capabilities initialization

The qemuCapsInitQMP method never frees the QEMU 'package'
version string.
This commit is contained in:
Daniel P. Berrange 2012-12-04 13:16:07 +00:00
parent cc5c7f9865
commit f6bd0a8899

View File

@ -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];