dsdb: Fix CID 1433614 Dereference after null check
[samba.git] / source4 / dsdb / samdb / ldb_modules / partition.c
index 422ed369ff55ab7d2fea78d424534925f18c33bf..37e714d6e1be78e0c79695efdf28ffda84eb659b 100644 (file)
@@ -1016,7 +1016,8 @@ int partition_del_trans(struct ldb_module *module)
                                                              struct partition_private_data);
 
        for (i=0; data && data->partitions && data->partitions[i]; i++) {
-               if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) {
+               if (ldb_module_flags(ldb_module_get_ctx(module)) &
+                   LDB_FLG_ENABLE_TRACING) {
                        ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_del_trans() -> %s",
                                  ldb_dn_get_linearized(data->partitions[i]->ctrl->dn));
                }
@@ -1035,7 +1036,8 @@ int partition_del_trans(struct ldb_module *module)
        }
        data->in_transaction--;
 
-       if ((module && ldb_module_flags(ldb_module_get_ctx(module)) & LDB_FLG_ENABLE_TRACING)) {
+       if (ldb_module_flags(ldb_module_get_ctx(module)) &
+           LDB_FLG_ENABLE_TRACING) {
                ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_TRACE, "partition_del_trans() -> (metadata partition)");
        }
        ret = ldb_next_del_trans(module);