dsdb: reset schema->{classes,attributes}_to_remove_size to 0
authorStefan Metzmacher <metze@samba.org>
Mon, 10 Jun 2013 08:46:41 +0000 (10:46 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 10 Jun 2013 08:47:43 +0000 (10:47 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source4/dsdb/schema/schema_set.c

index 73264f9545a6906fcebbfacd67f83c0befabd969..ce8facbef3c9e62f0ad027cf9d435cff44b30098 100644 (file)
@@ -338,8 +338,10 @@ int dsdb_setup_sorted_accessors(struct ldb_context *ldb,
                TALLOC_FREE(schema->attributes_to_remove[i]);
        }
 
-       TALLOC_FREE(schema->attributes_to_remove);
        TALLOC_FREE(schema->classes_to_remove);
+       schema->classes_to_remove_size = 0;
+       TALLOC_FREE(schema->attributes_to_remove);
+       schema->attributes_to_remove_size = 0;
 
        /* free all caches */
        dsdb_sorted_accessors_free(schema);