From: Swen Schillig Date: Mon, 8 Jan 2018 13:13:46 +0000 (+0100) Subject: ctdb-common: Remove sock_queue_destructor X-Git-Tag: tevent-0.9.36~261 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eae2d35fec071b020f420ba74ac6551c84140a4d;p=thirdparty%2Fsamba.git ctdb-common: Remove sock_queue_destructor The sock_queue_destructor is not needed. The performed tasks will be performed automatically. Signed-off-by: Swen Schillig Reviewed-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- diff --git a/ctdb/common/sock_io.c b/ctdb/common/sock_io.c index 8a0b9859d01..ef7cfeb2ea1 100644 --- a/ctdb/common/sock_io.c +++ b/ctdb/common/sock_io.c @@ -95,7 +95,6 @@ struct sock_queue { }; static bool sock_queue_set_fd(struct sock_queue *queue, int fd); -static int sock_queue_destructor(struct sock_queue *queue); static void sock_queue_handler(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, void *private_data); @@ -138,8 +137,6 @@ struct sock_queue *sock_queue_setup(TALLOC_CTX *mem_ctx, return NULL; } - talloc_set_destructor(queue, sock_queue_destructor); - return queue; } @@ -168,14 +165,6 @@ static bool sock_queue_set_fd(struct sock_queue *queue, int fd) return true; } -static int sock_queue_destructor(struct sock_queue *queue) -{ - TALLOC_FREE(queue->fde); - queue->fd = -1; - - return 0; -} - static void sock_queue_handler(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, void *private_data)