From: Ralf Habacker Date: Wed, 12 Oct 2022 07:34:37 +0000 (+0200) Subject: test-autolaunch-win.c: Prevent assertion in dbus_message_unref() X-Git-Tag: dbus-1.15.4~28^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7724bf574ca2d1407daf0be336977e5f6cccf45d;p=thirdparty%2Fdbus.git test-autolaunch-win.c: Prevent assertion in dbus_message_unref() dbus_message_unref() is in principle able to handle a NULL parameter, but causes the program to abort when `fatal_warnings_on_check_failed` is set. Therefore the call with a NULL parameter is avoided from now on. Fixes #422 --- diff --git a/test/name-test/test-autolaunch-win.c b/test/name-test/test-autolaunch-win.c index 30b8353bc..b2a7e9c72 100644 --- a/test/name-test/test-autolaunch-win.c +++ b/test/name-test/test-autolaunch-win.c @@ -62,11 +62,11 @@ call_method (DBusConnection *conn, /* ..._send_with_reply_and_block converts ERROR messages into errors */ _dbus_assert (dbus_message_get_type (reply) != DBUS_MESSAGE_TYPE_ERROR); + dbus_message_unref (reply); result = TRUE; out: _DBUS_ASSERT_ERROR_XOR_BOOL (error, result); - dbus_message_unref (reply); return result; }