ctdb-protocol: Fix CID 1417428
authorAmitay Isaacs <amitay@gmail.com>
Tue, 5 Sep 2017 06:36:16 +0000 (16:36 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 5 Sep 2017 13:16:06 +0000 (15:16 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Sep  5 15:16:06 CEST 2017 on sn-devel-144

ctdb/protocol/protocol_types.c

index 3fc00c96335148bf36a00ac69e3bcfb8122880e6..ae6f7ed527aee941d32ff468262a0690595eb30b 100644 (file)
@@ -3892,8 +3892,8 @@ int ctdb_script_list_pull(uint8_t *buf, size_t buflen, TALLOC_CTX *mem_ctx,
        offset += np;
 
        if (val->num_scripts == 0) {
-               goto done;
                val->script = NULL;
+               goto done;
        }
 
        val->script = talloc_array(val, struct ctdb_script, val->num_scripts);