ctdb-tcp: Use TALLOC_FREE()
authorMartin Schwenke <martin@meltin.net>
Thu, 15 Aug 2019 05:45:16 +0000 (15:45 +1000)
committerKarolin Seeger <kseeger@samba.org>
Wed, 28 Aug 2019 07:36:30 +0000 (07:36 +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>
(cherry picked from commit d80d9edb4dc107b15a35a39e5c966a3eaed6453a)

ctdb/tcp/tcp_connect.c

index 1f2379cdb795f73d24e3e5d3d94b6abf6447122f..f2d036fb5f7e875e30dead60e512f93adba41fc9 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;