mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-11 02:50:22 +01:00
dbus_server_listen: Don't leak first_connect_error
If an implementation fails to listen, and a subsequent implementation succeeds, then we would have leaked this. Detected by running tests/loopback.c under valgrind. 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:
parent
532d6d7cae
commit
b14a4517a8
1 changed files with 1 additions and 0 deletions
|
|
@ -685,6 +685,7 @@ dbus_server_listen (const char *address,
|
|||
}
|
||||
else
|
||||
{
|
||||
dbus_error_free (&first_connect_error);
|
||||
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
|
||||
return server;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue