[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v5 1/5] qemuBuildChrDeviceCommandLine: Don't leak devstr



It's caller's responsibility to free return value of
qemuBuildChrDeviceStr().
---
 src/qemu/qemu_command.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0e517f2..d6ef9cd 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;
 }
 
-- 
1.8.1.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]