[PATCH] ctdb: Fixing memory leak in ctdb_tcp_tnode_cb
Swen Schillig
swen at vnet.ibm.com
Tue Mar 13 09:13:05 UTC 2018
Please review and push if OK.
Thanks in advance.
Cheers Swen
-------------- next part --------------
From ea03ba87882c6bd5fdb66ced8bdc64af35887d91 Mon Sep 17 00:00:00 2001
From: Swen Schillig <swen at vnet.ibm.com>
Date: Tue, 13 Mar 2018 09:42:24 +0100
Subject: [PATCH] ctdb: Fixing memory leak in ctdb_tcp_tnode_cb
It is expected by the caller that the callback is free'ing the memory
referenced by the data pointer.
Signed-off-by: Swen Schillig <swen at vnet.ibm.com>
---
ctdb/tcp/tcp_connect.c | 1 +
1 file changed, 1 insertion(+)
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);
}
/*
--
2.14.3
More information about the samba-technical
mailing list