From 7410c84674a40ce717858c8b9c11b9b434e380df 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316 Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke Reviewed-by: Günther Deschner (cherry picked from commit 70dbba96e311449575f571db68710584fc991234) --- 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