]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tools: Free connection list after processing it
authorAmitay Isaacs <amitay@gmail.com>
Fri, 5 Aug 2016 02:46:18 +0000 (12:46 +1000)
committerMartin Schwenke <martins@samba.org>
Mon, 8 Aug 2016 06:17:33 +0000 (08:17 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121

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

index b00c3fc043681dbce20f8729befc5f83fa89b5d6..5ed4e59d2e6594157cc981ce453629ac1c44547a 100644 (file)
@@ -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) {