From: Jeremy Allison Date: Fri, 1 Jul 2022 15:49:42 +0000 (-0700) Subject: s3: libads: Fix coverity false positive. X-Git-Tag: tevent-0.13.0~207 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=96a649efd8d4da05c99a67e33a2354d4f2a4ced7;p=thirdparty%2Fsamba.git s3: libads: Fix coverity false positive. dn is always returned as NULL on error in ads_build_path(), but coverity can't see that. Easy change to quieten it. Signed-off-by: Jeremy Allison Reviewed-by: Noel Power Autobuild-User(master): Noel Power Autobuild-Date(master): Mon Jul 4 16:42:28 UTC 2022 on sn-devel-184 --- diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c index 90634effc58..97f84d124d0 100644 --- a/source3/libads/ads_struct.c +++ b/source3/libads/ads_struct.c @@ -106,6 +106,7 @@ ADS_STATUS ads_build_dn(const char *realm, TALLOC_CTX *mem_ctx, char **_dn) status = ads_build_path(realm, ".", "dc=", 0, &dn); if (!ADS_ERR_OK(status)) { + SAFE_FREE(dn); return status; }