ctdb-daemon: Improve error handling consistency
authorMartin Schwenke <martin@meltin.net>
Mon, 27 Aug 2018 05:28:47 +0000 (15:28 +1000)
committerStefan Metzmacher <metze@samba.org>
Wed, 5 Sep 2018 11:31:40 +0000 (13:31 +0200)
Other errors free argv, so do it here too.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit e357b62fe556609750bdb8d27cf48dfb85c62ec8)

ctdb/server/eventscript.c

index 41807ff..74f132c 100644 (file)
@@ -219,6 +219,7 @@ int ctdb_start_eventd(struct ctdb_context *ctdb)
        if (pid == -1) {
                close(fd[0]);
                close(fd[1]);
+               talloc_free(argv);
                return -1;
        }