ctdb-tcp: Use TALLOC_FREE()
authorMartin Schwenke <martin@meltin.net>
Thu, 15 Aug 2019 05:45:16 +0000 (15:45 +1000)
committerMartin Schwenke <martins@samba.org>
Fri, 16 Aug 2019 21:30:35 +0000 (21:30 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14084

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tcp/tcp_connect.c

index 866454f3d2945b5d1f2f4264966781aeb8a25e6b..16d754810501fb56a52a4a3072dde7ccd9d71837 100644 (file)
@@ -46,10 +46,8 @@ void ctdb_tcp_stop_connection(struct ctdb_node *node)
                node->private_data, struct ctdb_tcp_node);
        
        ctdb_queue_set_fd(tnode->out_queue, -1);
-       talloc_free(tnode->connect_te);
-       talloc_free(tnode->connect_fde);
-       tnode->connect_fde = NULL;
-       tnode->connect_te = NULL;
+       TALLOC_FREE(tnode->connect_te);
+       TALLOC_FREE(tnode->connect_fde);
        if (tnode->out_fd != -1) {
                close(tnode->out_fd);
                tnode->out_fd = -1;