]> xenbits.xensource.com Git - libvirt.git/commit
tests: free ChardevInfo correctly in qemumonitorjsontest
authorZhang Bo <oscar.zhangbo@huawei.com>
Tue, 28 Apr 2015 01:16:13 +0000 (09:16 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 28 Apr 2015 15:01:16 +0000 (17:01 +0200)
commite6bb622032e8e98b85609f9a237aef5e56cb925f
tree1ae8cee377b3cf14fe4877dc65df10a92d7e2f26
parent6f5d29f40d6b3fad4476e5b0681ff2f93ff795a9
tests: free ChardevInfo correctly in qemumonitorjsontest

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

==29959== 24 bytes in 2 blocks are definitely lost in loss record 19 of 53
==29959==    at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==29959==    by 0xB95C679: strdup (in /lib64/libc-2.20.so)
==29959==    by 0x63C6546: virStrdup (virstring.c:709)
==29959==    by 0x4805ED: qemuMonitorJSONExtractChardevInfo (qemu_monitor_json.c:3429)
==29959==    by 0x4807A5: qemuMonitorJSONGetChardevInfo (qemu_monitor_json.c:3479)
==29959==    by 0x434AEC: testQemuMonitorJSONqemuMonitorJSONGetChardevInfo (qemumonitorjsontest.c:1824)
==29959==    by 0x436F2F: virtTestRun (testutils.c:211)
==29959==    by 0x436932: mymain (qemumonitorjsontest.c:2404)
==29959==    by 0x4382EA: virtTestMain (testutils.c:863)
==29959==    by 0x436B27: main (qemumonitorjsontest.c:2423)

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
Signed-off-by: Zhou Yimin <zhouyimin@huawei.com>
tests/qemumonitorjsontest.c