From 6dcd2c1acb75fcbedc1b124520e316664a284b8f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 5 Oct 2015 15:57:42 +0200 Subject: [PATCH] s3:ctdbd_conn: make sure we destroy tevent_fd before closing the socket BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316 Signed-off-by: Stefan Metzmacher --- source3/lib/ctdbd_conn.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 1acce12..c19b6e5 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -421,7 +421,11 @@ static int ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid, static int ctdbd_connection_destructor(struct ctdbd_connection *c) { - close(c->fd); + TALLOC_FREE(c->fde); + if (c->fd != -1) { + close(c->fd); + c->fd = -1; + } return 0; } /* -- 1.9.1