summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_search.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_search.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index ebbc1a3974..e43125d588 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -473,6 +473,10 @@ int ltdb_search_bytree(struct ldb_module *module, const struct ldb_dn *base,
return -1;
}
+ if (tree == NULL) {
+ return -1;
+ }
+
*res = NULL;
ret = ltdb_search_indexed(module, base, scope, tree, attrs, res);