]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuBuildChrDeviceCommandLine: Don't leak devstr
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 12 Jul 2013 17:18:29 +0000 (19:18 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 15 Jul 2013 14:25:11 +0000 (16:25 +0200)
It's caller's responsibility to free return value of
qemuBuildChrDeviceStr().

src/qemu/qemu_command.c

index 0e517f21a78e2f0039e6ae7c18a4c277800a6091..d6ef9cd60a5973b51d2fbdbfb3b88da268dcdaa3 100644 (file)
@@ -6608,6 +6608,7 @@ qemuBuildChrDeviceCommandLine(virCommandPtr cmd,
         return -1;
 
     virCommandAddArgList(cmd, "-device", devstr, NULL);
+    VIR_FREE(devstr);
     return 0;
 }