From a7cbf55e9c66e7ce05129488b6e13c27cd63b669 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 21 Nov 2017 14:36:02 +0000 Subject: [PATCH 04/12] _dbus_server_new_for_socket: Invalidate watches during error unwinding We assert that every watch is invalidated before it is freed, but in some OOM code paths this didn't happen. Signed-off-by: Simon McVittie --- dbus/dbus-server-socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dbus/dbus-server-socket.c b/dbus/dbus-server-socket.c index 04ab05f7..b5179be6 100644 --- a/dbus/dbus-server-socket.c +++ b/dbus/dbus-server-socket.c @@ -356,6 +356,7 @@ _dbus_server_new_for_socket (DBusSocket *fds, { if (socket_server->watch[i] != NULL) { + _dbus_watch_invalidate (socket_server->watch[i]); _dbus_watch_unref (socket_server->watch[i]); socket_server->watch[i] = NULL; } -- 2.15.0