dsdb: Use talloc_get_type_abort() in schema_load_{start,end}_transaction
authorAndrew Bartlett <abartlet@samba.org>
Tue, 10 Apr 2018 01:34:56 +0000 (13:34 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 12 Apr 2018 03:15:17 +0000 (05:15 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13379

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/schema_load.c

index e977e8b0ad5ef285706a8b9766bc5dc9b68f7e99..7cbbeb699ee25e208b79dc97743f5848180d6025 100644 (file)
@@ -514,7 +514,8 @@ static int schema_load_init(struct ldb_module *module)
 static int schema_load_start_transaction(struct ldb_module *module)
 {
        struct schema_load_private_data *private_data =
-               talloc_get_type(ldb_module_get_private(module), struct schema_load_private_data);
+               talloc_get_type_abort(ldb_module_get_private(module),
+                                     struct schema_load_private_data);
        struct ldb_context *ldb = ldb_module_get_ctx(module);
        struct dsdb_schema *schema;
        int ret;
@@ -547,7 +548,8 @@ static int schema_load_start_transaction(struct ldb_module *module)
 static int schema_load_end_transaction(struct ldb_module *module)
 {
        struct schema_load_private_data *private_data =
-               talloc_get_type(ldb_module_get_private(module), struct schema_load_private_data);
+               talloc_get_type_abort(ldb_module_get_private(module),
+                                     struct schema_load_private_data);
        struct ldb_context *ldb = ldb_module_get_ctx(module);
 
        if (private_data->in_transaction == 0) {