]> git.ipfire.org Git - thirdparty/dbus.git/commit
_dbus_server_new_for_socket: Properly disconnect during error unwinding
authorSimon McVittie <smcv@collabora.com>
Tue, 21 Nov 2017 14:38:13 +0000 (14:38 +0000)
committerSimon McVittie <smcv@collabora.com>
Fri, 24 Nov 2017 12:17:26 +0000 (12:17 +0000)
commit0c03b505a9718c6d497caffb7d6083371679a852
tree4fbe5e4069e94f83d87b9246c369e571bad11131
parent1ce34beef85a7a0b3c25890837e3a72f8bdac1f0
_dbus_server_new_for_socket: Properly disconnect during error unwinding

_dbus_server_finalize_base() asserts that the socket has been
disconnected, but in some OOM code paths we would call it without
officially disconnecting. Do so.

This means we need to be a bit more careful about what is
socket_disconnect()'s responsibility to clean up, what is
_dbus_server_new_for_socket()'s responsibility, and what is the caller's
responsibility.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89104
dbus/dbus-server-protected.h
dbus/dbus-server-socket.c
dbus/dbus-server.c