summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 22486ea7fb..ddfe10b914 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1486,6 +1486,11 @@ int net_ads_join(struct net_context *c, int argc, const char **argv)
ads_dns->auth.password = secrets_fetch_machine_password(
r->out.netbios_domain_name, NULL, NULL);
+ if (ads_dns->auth.password == NULL) {
+ d_fprintf(stderr, _("DNS update failed: out of memory\n"));
+ goto dns_done;
+ }
+
ads_dns->auth.realm = SMB_STRDUP(r->out.dns_domain_name);
strupper_m(ads_dns->auth.realm);
ads_kinit_password(ads_dns);