1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

s3:net ads join: check for malloc success and react accordingly in dns update block

This commit is contained in:
Michael Adam 2012-01-30 14:07:52 +01:00
parent ca913c98a6
commit 4831b6e6bb

View File

@ -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);