[PATCH] [s3] Possible memory leak in map_info3_to_validation
Swen Schillig
swen at vnet.ibm.com
Thu Jun 14 07:24:10 UTC 2018
Please review and push if happy.
Thanks in advance.
Cheers Swen
-------------- next part --------------
From ce873121102384677b06ebd39fe7534c42505a00 Mon Sep 17 00:00:00 2001
From: Swen Schillig <swen at vnet.ibm.com>
Date: Fri, 25 May 2018 10:40:54 +0200
Subject: [PATCH] [s3] 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 <swen at vnet.ibm.com>
---
source3/rpc_client/util_netlogon.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.14.4
More information about the samba-technical
mailing list