From: Ralf Habacker Date: Sat, 18 Apr 2020 11:34:19 +0000 (+0200) Subject: desktop-file test: Free result on all code paths X-Git-Tag: dbus-1.13.16~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44c8b03c3424cc393253fdf8f576614aa8322725;p=thirdparty%2Fdbus.git 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 --- diff --git a/test/internals/desktop-file.c b/test/internals/desktop-file.c index a11801f0e..4db4076fa 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); } }