From: Swen Schillig Date: Tue, 13 Mar 2018 08:42:24 +0000 (+0100) Subject: ctdb: Fixing memory leak in ctdb_tcp_tnode_cb X-Git-Tag: talloc-2.1.13~106 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=611c9a0ba9472aae17a3099da20ea2d836cef84a;p=thirdparty%2Fsamba.git ctdb: Fixing memory leak in ctdb_tcp_tnode_cb It is expected by the caller(queue_process) that the callback is free'ing the memory referenced by the data pointer. Signed-off-by: Swen Schillig Reviewed-by: Martin Schwenke Reviewed-by: Jeremy Allison --- diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c index 17aafc415f7..13452a5e83b 100644 --- a/ctdb/tcp/tcp_connect.c +++ b/ctdb/tcp/tcp_connect.c @@ -75,6 +75,7 @@ void ctdb_tcp_tnode_cb(uint8_t *data, size_t cnt, void *private_data) tnode->connect_te = tevent_add_timer(node->ctdb->ev, tnode, timeval_current_ofs(3, 0), ctdb_tcp_node_connect, node); + TALLOC_FREE(data); } /*