[PATCH 2/2] tests: free ChardevInfo correctly in qemumonitorjsontest

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

 



the free callback should be qemuMonitorChardevInfoFree rather than just 'free'
when virHashCreate'ing the chardevInfo hash.

Signed-off-by: Zhang Bo <oscar.zhangbo@xxxxxxxxxx>
Signed-off-by: Zhou Yimin <zhouyimin@xxxxxxxxxx>
---
 tests/qemumonitorjsontest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index f729c7c..9296668 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -28,7 +28,7 @@
 #include "virerror.h"
 #include "virstring.h"
 #include "cpu/cpu.h"
-
+#include "qemu/qemu_monitor.h"
 
 #define VIR_FROM_THIS VIR_FROM_NONE
 
@@ -1782,7 +1782,7 @@ testQemuMonitorJSONqemuMonitorJSONGetChardevInfo(const void *data)
     if (!test)
         return -1;
 
-    if (!(info = virHashCreate(32, (virHashDataFree) free)) ||
+    if (!(info = virHashCreate(32, qemuMonitorChardevInfoFree)) ||
         !(expectedInfo = virHashCreate(32, NULL)))
         goto cleanup;
 
-- 
1.7.12.4


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]