From: Swen Schillig Date: Fri, 25 May 2018 08:06:21 +0000 (+0200) Subject: Possible memory leak in map_info6_to_validation X-Git-Tag: tevent-0.9.37~330 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4dac6e7cd08ab226eff9415b4924b6dcd8e5178d;p=thirdparty%2Fsamba.git Possible memory leak in map_info6_to_validation If the call to copy_netr_SamInfo6 returns an error status, the allocated memory for "validation" needs to be free'd before returning. Signed-off-by: Swen Schillig Reviewed-by: Jeremy Allison Reviewed-by: Christof Schmitt --- diff --git a/source3/rpc_client/util_netlogon.c b/source3/rpc_client/util_netlogon.c index 2d73bc95cea..c57979a1265 100644 --- a/source3/rpc_client/util_netlogon.c +++ b/source3/rpc_client/util_netlogon.c @@ -378,6 +378,7 @@ NTSTATUS map_info6_to_validation(TALLOC_CTX *mem_ctx, info6, &validation->sam6); if (!NT_STATUS_IS_OK(status)) { + TALLOC_FREE(validation); return status; }