From 448d6cd32c793d04c3c509200bfaa75f466a0ee5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 22 Apr 2009 02:55:47 -0700 Subject: [PATCH] Fix bug #6279 - winbindd crash. Cope with LDAP libraries returning LDAP_SUCCESS but not returning a result. Jeremy --- source/libads/ldap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/libads/ldap.c b/source/libads/ldap.c index 65f13cd7810..ace95f0a274 100644 --- a/source/libads/ldap.c +++ b/source/libads/ldap.c @@ -112,6 +112,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; } -- 2.47.2