From 96a649efd8d4da05c99a67e33a2354d4f2a4ced7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Jul 2022 08:49:42 -0700 Subject: [PATCH] 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 --- source3/libads/ads_struct.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.47.3