summaryrefslogtreecommitdiff
path: root/source3/libsmb/namequery_dc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/namequery_dc.c')
-rw-r--r--source3/libsmb/namequery_dc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/libsmb/namequery_dc.c b/source3/libsmb/namequery_dc.c
index f4c2fc1929..df5eeb8d89 100644
--- a/source3/libsmb/namequery_dc.c
+++ b/source3/libsmb/namequery_dc.c
@@ -137,7 +137,10 @@ static bool ads_dc_name(const char *domain,
SAFE_FREE(sitename);
fstrcpy(srv_name, ads->config.ldap_server_name);
- strupper_m(srv_name);
+ if (!strupper_m(srv_name)) {
+ ads_destroy(&ads);
+ return false;
+ }
#ifdef HAVE_ADS
*dc_ss = ads->ldap.ss;
#else