From 9261f6e928bba21436dd3168db6db231e6a4e3ad Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 11 Jan 2005 15:18:18 +0000 Subject: r4685: only remove events when we have them metze (This used to be commit d2276a9149b14aed459e9492384c0a7563dd154c) --- source4/smbd/service.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source4/smbd') diff --git a/source4/smbd/service.c b/source4/smbd/service.c index fac0e175a1..586c05c2c6 100644 --- a/source4/smbd/service.c +++ b/source4/smbd/service.c @@ -192,10 +192,14 @@ static int server_destructor(void *ptr) socket_destroy(conn->socket); - event_remove_fd(conn->event.ctx, conn->event.fde); - conn->event.fde = NULL; - event_remove_timed(conn->event.ctx, conn->event.idle); - conn->event.idle = NULL; + if (conn->event.fde) { + event_remove_fd(conn->event.ctx, conn->event.fde); + conn->event.fde = NULL; + } + if (conn->event.idle) { + event_remove_timed(conn->event.ctx, conn->event.idle); + conn->event.idle = NULL; + } DLIST_REMOVE(conn->server_socket->connection_list, conn); -- cgit