Found by running valgrind for these tests.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virCommandPtr cmd = virCommandNew("some/nonexistent/binary");
rv = virCommandExec(cmd);
+
+ virCommandFree(cmd);
+
if (safewrite(pipeFD[1], &rv, sizeof(rv)) < 0)
fprintf(stderr, "Unable to write to pipe\n");
_exit(EXIT_FAILURE);
"/usr/bin/qemu-system-s390x", NULL,
"s390x", VIR_DOMAIN_VIRT_KVM);
+ virObjectUnref(cfg);
+
#endif /* WITH_QEMU */
#if WITH_LIBXL
ignore_value(virStoragePoolDestroy(pool));
goto cleanup;
}
+ virNodeDeviceFree(dev);
if (virStoragePoolDestroy(pool) < 0)
goto cleanup;
if ((dev = virNodeDeviceLookupByName(conn, expect_hostname))) {
VIR_DEBUG("Found expected_hostname '%s' after destroy",
expect_hostname);
+ virNodeDeviceFree(dev);
goto cleanup;
}
abort(); \
if (make_controller(path, 0755) < 0) { \
fprintf(stderr, "Cannot initialize %s\n", path); \
+ free(path); \
abort(); \
} \
+ free(path); \
} while (0)
MAKE_CONTROLLER("cpu");