提交 f6bd0a88 编写于 作者: D Daniel P. Berrange

Fix memory leak in QEMU QMP capabilities initialization

The qemuCapsInitQMP method never frees the QEMU 'package'
version string.
上级 cc5c7f98
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册