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 <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194
This commit is contained in:
Simon McVittie 2018-07-09 17:06:22 +01:00
parent 58be2ad035
commit b940ccdbd1

View file

@ -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",