From: Michal Privoznik Date: Fri, 12 Jul 2013 17:18:29 +0000 (+0200) Subject: qemuBuildChrDeviceCommandLine: Don't leak devstr X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=797b1ffce1e8eccb56b45c1408ceb556bb0573ac;p=libvirt.git qemuBuildChrDeviceCommandLine: Don't leak devstr It's caller's responsibility to free return value of qemuBuildChrDeviceStr(). --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 0e517f21a7..d6ef9cd60a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6608,6 +6608,7 @@ qemuBuildChrDeviceCommandLine(virCommandPtr cmd, return -1; virCommandAddArgList(cmd, "-device", devstr, NULL); + VIR_FREE(devstr); return 0; }