summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index ddfe10b914..cb15b76a28 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1492,6 +1492,11 @@ int net_ads_join(struct net_context *c, int argc, const char **argv)
}
ads_dns->auth.realm = SMB_STRDUP(r->out.dns_domain_name);
+ if (ads_dns->auth.realm == NULL) {
+ d_fprintf(stderr, _("DNS update failed: out of memory\n"));
+ goto dns_done;
+ }
+
strupper_m(ads_dns->auth.realm);
ads_kinit_password(ads_dns);