From: Michael Tremer Date: Tue, 11 Jun 2019 02:45:28 +0000 (+0100) Subject: tests: Fix refcounting issues in keys test X-Git-Tag: 0.9.28~1285^2~937 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1dae99d3165be4a521e5937fd9ad2582642fd8bc;p=pakfire.git tests: Fix refcounting issues in keys test Signed-off-by: Michael Tremer --- diff --git a/tests/libpakfire/key.c b/tests/libpakfire/key.c index 1c119a0dd..359a352c6 100644 --- a/tests/libpakfire/key.c +++ b/tests/libpakfire/key.c @@ -69,6 +69,8 @@ int test_import(const test_t* t) { const char* fingerprint = pakfire_key_get_fingerprint(key); assert_return(strcmp(fingerprint, TEST_KEY_FINGERPRINT) == 0, EXIT_FAILURE); + pakfire_key_unref(key); + return EXIT_SUCCESS; } @@ -86,9 +88,10 @@ int test_export(const test_t* t) { assert_return(data, EXIT_FAILURE); LOG("Exported key:\n%s\n", data); - pakfire_free(data); + pakfire_key_unref(key); + return EXIT_SUCCESS; }