mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
tests: fix some memleaks in tests
Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
This commit is contained in:
parent
659dbba37e
commit
083ac198bc
@ -1081,6 +1081,7 @@ static int test24(const void *unused ATTRIBUTE_UNUSED)
|
||||
if (pidfile)
|
||||
unlink(pidfile);
|
||||
VIR_FREE(pidfile);
|
||||
VIR_FREE(prefix);
|
||||
virCommandFree(cmd);
|
||||
VIR_FORCE_CLOSE(newfd1);
|
||||
/* coverity[double_close] */
|
||||
|
@ -242,6 +242,7 @@ mymain(void)
|
||||
ret = -1; \
|
||||
} else if (virtTestRun(Filename, test_virDomainCapsFormat, &data) < 0) \
|
||||
ret = -1; \
|
||||
virObjectUnref(qemuCaps); \
|
||||
} while (0)
|
||||
|
||||
DO_TEST_QEMU("qemu_1.6.50-1", "caps_1.6.50-1", "/usr/bin/qemu-system-x86_64",
|
||||
|
@ -66,6 +66,7 @@ testQemuCommandBuildObjectFromJSON(const void *opaque)
|
||||
cleanup:
|
||||
virJSONValueFree(val);
|
||||
VIR_FREE(result);
|
||||
VIR_FREE(expect);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user