summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/pdb_ldap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 6ac8f0df24..f4c8dbe516 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -4483,10 +4483,6 @@ static bool ldapsam_search_next_entry(struct pdb_search *search,
bool result;
retry:
- if (state->current_entry == NULL) {
- return false;
- }
-
if ((state->entries == NULL) && (state->pagedresults_cookie == NULL))
return False;
@@ -4494,6 +4490,10 @@ static bool ldapsam_search_next_entry(struct pdb_search *search,
!ldapsam_search_nextpage(search))
return False;
+ if (state->current_entry == NULL) {
+ return false;
+ }
+
result = state->ldap2displayentry(state, search,
state->connection->ldap_struct,
state->current_entry, entry);