From 7a0e61f38ea6b13f1f45e89f6f160d6c32f08617 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 15 Jul 2004 09:43:32 +0000 Subject: r1516: remove the server_connection from the list on the server_socket and call talloc_destroy(srv_conn->mem_ctx) also don't follow NULL pointers metze (This used to be commit 786c00c3d4f510c870a45f11af69281298ba176d) --- source4/smbd/service.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/smbd/service.c') diff --git a/source4/smbd/service.c b/source4/smbd/service.c index d225a69b17..c90792e452 100644 --- a/source4/smbd/service.c +++ b/source4/smbd/service.c @@ -247,8 +247,11 @@ void server_terminate_connection(struct server_connection *srv_conn, const char void server_destroy_connection(struct server_connection *srv_conn) { close(srv_conn->event.fde->fd); + event_remove_fd(srv_conn->event.ctx, srv_conn->event.fde); event_remove_timed(srv_conn->event.ctx, srv_conn->event.idle); + + talloc_destroy(srv_conn->mem_ctx); } void server_io_handler(struct event_context *ev, struct fd_event *fde, time_t t, uint16_t flags) -- cgit