[s3] CID 1415702: memory leak if cli_smb2_notify fails
Swen Schillig
swen at vnet.ibm.com
Wed Jun 13 09:09:36 UTC 2018
Please review and push if happy.
Cheers Swen
-------------- next part --------------
From c26a2996d2403a72eee86e33a2892c49aa26c804 Mon Sep 17 00:00:00 2001
From: Swen Schillig <swen at vnet.ibm.com>
Date: Fri, 25 May 2018 13:04:57 +0200
Subject: [PATCH] [s3] CID 1415702: memory leak if cli_smb2_notify fails
Signed-off-by: Swen Schillig <swen at vnet.ibm.com>
---
source3/libsmb/cli_smb2_fnum.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index 1eb1bea7a72..fb62fd56d54 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -4251,6 +4251,8 @@ NTSTATUS cli_smb2_notify(struct cli_state *cli, uint16_t fnum,
fail:
cli->raw_status = status;
+ /* if in error free mem ref'ed by changes, otherwise changes == NULL */
+ TALLOC_FREE(changes);
TALLOC_FREE(frame);
return status;
}
--
2.14.4
More information about the samba-technical
mailing list