summaryrefslogtreecommitdiff
path: root/source3/libads/ldap_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/ldap_utils.c')
-rw-r--r--source3/libads/ldap_utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/libads/ldap_utils.c b/source3/libads/ldap_utils.c
index 9e4b8a1de9..907f7c8aff 100644
--- a/source3/libads/ldap_utils.c
+++ b/source3/libads/ldap_utils.c
@@ -42,6 +42,9 @@ ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path, int scope
bp = strdup(bind_path);
+ if (!bp)
+ return ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
+
while (count--) {
status = ads_do_search_all(ads, bp, scope, exp, attrs, res);
if (ADS_ERR_OK(status)) {