From 2e5e51ebcd3ec8283cdd9c9d13dbe1fc836f8a3d Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 5 Aug 2016 12:46:18 +1000 Subject: [PATCH] ctdb-tools: Free connection list after processing it BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/tools/ctdb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index b00c3fc0436..5ed4e59d2e6 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -3238,10 +3238,12 @@ static int control_addtickle(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, ctdb_req_control_tcp_add_delayed_update, ctdb_reply_control_tcp_add_delayed_update); if (req == NULL) { + talloc_free(clist); return ENOMEM; } tevent_req_poll(req, ctdb->ev); + talloc_free(clist); ret = process_clist_recv(req); if (ret != 0) { @@ -3299,10 +3301,12 @@ static int control_deltickle(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, ctdb_req_control_tcp_remove, ctdb_reply_control_tcp_remove); if (req == NULL) { + talloc_free(clist); return ENOMEM; } tevent_req_poll(req, ctdb->ev); + talloc_free(clist); ret = process_clist_recv(req); if (ret != 0) {