summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 9ffbd57e4a..74f9b94a12 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -118,6 +118,10 @@ static int ldap_search_with_timeout(LDAP *ld,
if (gotalarm != 0)
return LDAP_TIMELIMIT_EXCEEDED;
+ if (*res == NULL) {
+ return LDAP_TIMELIMIT_EXCEEDED;
+ }
+
return result;
}