From: Simon McVittie Date: Mon, 9 Jul 2018 16:06:22 +0000 (+0100) Subject: Assert that DBUS_SERVER_LISTEN_ADDRESS_ALREADY_USED does not set error X-Git-Tag: dbus-1.13.6~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b940ccdbd1c905e7de5e5e2d1b11e48c7fb3be5e;p=thirdparty%2Fdbus.git Assert that DBUS_SERVER_LISTEN_ADDRESS_ALREADY_USED does not set error The only place this is set in practice is in dbus-server-win.c, which does not set the error. If it did, dbus_server_listen() would leak it. Signed-off-by: Simon McVittie Reviewed-by: Philip Withnall Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194 --- diff --git a/dbus/dbus-server.c b/dbus/dbus-server.c index d91df8325..f26a8f7c1 100644 --- a/dbus/dbus-server.c +++ b/dbus/dbus-server.c @@ -595,6 +595,7 @@ dbus_server_listen (const char *address, else if (result == DBUS_SERVER_LISTEN_ADDRESS_ALREADY_USED) { _dbus_assert (server == NULL); + _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); dbus_set_error (error, DBUS_ERROR_ADDRESS_IN_USE, "Address '%s' already used",