From eb8968534dd53fa911f33ed500618787b23c6e14 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 15 Nov 2024 11:17:42 +0100 Subject: [PATCH] libnet3: Fix Coverity ID 1034874 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- source3/libnet/libnet_join.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 76ffe5ed2bb..fb5dfa33c90 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -893,12 +893,11 @@ static bool libnet_join_derive_salting_principal(TALLOC_CTX *mem_ctx, } salt = talloc_strdup(mem_ctx, std_salt); + SAFE_FREE(std_salt); if (!salt) { return false; } - SAFE_FREE(std_salt); - /* if it's a Windows functional domain, we have to look for the UPN */ if (domain_func == DS_DOMAIN_FUNCTION_2000) { -- 2.47.2