From: Jeremy Allison Date: Wed, 29 Jun 2022 15:20:21 +0000 (-0700) Subject: s3: winbind: Add missing NULL check for returned talloc'ed ADS struct. X-Git-Tag: tevent-0.13.0~215 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19b27299abeb8287c89212099c4dbddf721778b4;p=thirdparty%2Fsamba.git s3: winbind: Add missing NULL check for returned talloc'ed ADS struct. Coverity CID: 1506720. Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider --- diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 64441b4db16..28316e10d72 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -1099,6 +1099,10 @@ static bool dcip_check_name_ads(const struct winbindd_domain *domain, domain->name, addr, ADS_SASL_PLAIN); + if (ads == NULL) { + ads_status = ADS_ERROR_NT(NT_STATUS_NO_MEMORY); + goto out; + } ads->auth.flags |= ADS_AUTH_NO_BIND; ads->config.flags |= request_flags; ads->server.no_fallback = true;