From 44c8b03c3424cc393253fdf8f576614aa8322725 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sat, 18 Apr 2020 13:34:19 +0200 Subject: [PATCH] desktop-file test: Free result on all code paths Otherwise, Coverity will diagnose this as a resource leak, because it doesn't understand that our assertions end up guaranteeing that the result is freed if and only if it's non-`NULL`. Coverity CID: 354884 --- test/internals/desktop-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/internals/desktop-file.c b/test/internals/desktop-file.c index a11801f0..4db4076f 100644 --- a/test/internals/desktop-file.c +++ b/test/internals/desktop-file.c @@ -221,8 +221,8 @@ test_content (const Test *test, test_assert_no_error (&error); g_assert_true (ok); g_assert_cmpstr (val, ==, test->value); - dbus_free (val); } + dbus_free (val); } }