Commit b14a4517 authored by Simon McVittie's avatar Simon McVittie

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's avatarSimon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194
parent 532d6d7c
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment