ctdb-protocol: Fix marshalling for ctdb_script_list
[vlendec/samba-autobuild/.git] / ctdb / tests / src / protocol_common.c
index 4956b4e585bb851d92857e6ee81b8011138eeffd..d4f2f03d6496271dad4706ac1778ff07c1605eb5 100644 (file)
@@ -1075,8 +1075,8 @@ void fill_ctdb_script_list(TALLOC_CTX *mem_ctx, struct ctdb_script_list *p)
 
        p->num_scripts = rand_int(32);
        if (p->num_scripts > 0) {
-               p->script = talloc_array(mem_ctx, struct ctdb_script,
-                                        p->num_scripts);
+               p->script = talloc_zero_array(mem_ctx, struct ctdb_script,
+                                             p->num_scripts);
                assert(p->script != NULL);
                for (i=0; i<p->num_scripts; i++) {
                        fill_ctdb_script(mem_ctx, &p->script[i]);