Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- tests/testutilsqemu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 72c0b1857b..72b53096d9 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -585,7 +585,7 @@ testQemuGetLatestCaps(void) "s390x", "x86_64", }; - GHashTable *capslatest = virHashNew(g_free); + g_autoptr(GHashTable) capslatest = virHashNew(g_free); size_t i; VIR_TEST_VERBOSE(""); @@ -601,10 +601,9 @@ testQemuGetLatestCaps(void) VIR_TEST_VERBOSE(""); - return capslatest; + return g_steal_pointer(&capslatest); error: - virHashFree(capslatest); return NULL; } -- 2.31.1