From: Swen Schillig Date: Fri, 25 May 2018 08:40:54 +0000 (+0200) Subject: Possible memory leak in map_info3_to_validation X-Git-Tag: tevent-0.9.37~251 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bca97cc4738fb4461fd27b6df9556f3e1377519d;p=thirdparty%2Fsamba.git Possible memory leak in map_info3_to_validation In case of a failing call to copy_netr_SamInfo3, 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 Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jun 20 21:05:40 CEST 2018 on sn-devel-144 --- diff --git a/source3/rpc_client/util_netlogon.c b/source3/rpc_client/util_netlogon.c index c57979a1265..c5443ba0b09 100644 --- a/source3/rpc_client/util_netlogon.c +++ b/source3/rpc_client/util_netlogon.c @@ -353,6 +353,7 @@ NTSTATUS map_info3_to_validation(TALLOC_CTX *mem_ctx, info3, &validation->sam3); if (!NT_STATUS_IS_OK(status)) { + TALLOC_FREE(validation); return status; }