From e52c900b63bf61daf64e5495241a257a40998a06 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sun, 6 Mar 2011 15:56:06 +0100 Subject: s4:partition LDB module - move the "data" check a bit higher It can be performed a bit earlier. --- source4/dsdb/samdb/ldb_modules/partition.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index 57b804321f..1760fd7510 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -500,6 +500,11 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req) return ldb_oom(ldb_module_get_ctx(module)); } + /* if we aren't initialised yet go further */ + if (!data || !data->partitions) { + return ldb_next_request(module, req); + } + /* Locate the options */ domain_scope = (search_options && (search_options->search_options & LDB_SEARCH_OPTION_DOMAIN_SCOPE)) @@ -514,10 +519,6 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req) & ~LDB_SEARCH_OPTION_PHANTOM_ROOT; } - if (!data || !data->partitions) { - return ldb_next_request(module, req); - } - ac = partition_init_ctx(module, req); if (!ac) { return ldb_operr(ldb_module_get_ctx(module)); -- cgit