]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-common: Remove sock_queue_destructor
authorSwen Schillig <swen@vnet.ibm.com>
Mon, 8 Jan 2018 13:13:46 +0000 (14:13 +0100)
committerMartin Schwenke <martins@samba.org>
Tue, 30 Jan 2018 12:28:39 +0000 (13:28 +0100)
The sock_queue_destructor is not needed.
The performed tasks will be performed automatically.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/common/sock_io.c

index 8a0b9859d01d92af65248a71d668b05731b35f55..ef7cfeb2ea19ad61d0dcab646ff314d64da190c2 100644 (file)
@@ -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)