ctdb-common: Fix memory leak
authorMartin Schwenke <martin@meltin.net>
Sat, 11 May 2019 07:33:57 +0000 (17:33 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 14 May 2019 07:25:37 +0000 (07:25 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13943

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

index 8978d1452c0cb5fc11d5a3691dd69228eb47e619..8bdfdd0b5ca6a2ce79a21fcc1c284b9f38158e45 100644 (file)
@@ -117,7 +117,8 @@ int event_script_get_list(TALLOC_CTX *mem_ctx,
        }
 
        *out = script_list;
-       return 0;
+       ret = 0;
+       goto done;
 
 nomem:
        ret = ENOMEM;