[PATCH] [s3] CID 1414774: resource leak in cli_dfs_get_referral_ex

Swen Schillig swen at vnet.ibm.com
Thu Jun 14 07:27:50 UTC 2018


Please review and push if happy.

Thanks in advance.

Cheers Swen
-------------- next part --------------
From b1b4852feb2fd091dc045554167a5a1d9659ef70 Mon Sep 17 00:00:00 2001
From: Swen Schillig <swen at vnet.ibm.com>
Date: Fri, 25 May 2018 14:52:21 +0200
Subject: [PATCH] [s3] CID 1414774: resource leak in cli_dfs_get_referral_ex

The allocated memory to gather the length of the allocated path
must be free'd before returning.

Signed-off-by: Swen Schillig <swen at vnet.ibm.com>
---
 source3/libsmb/clidfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 0dfb8b33606..e162fc0af1c 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -850,7 +850,7 @@ NTSTATUS cli_dfs_get_referral_ex(TALLOC_CTX *ctx,
 	*refs = referrals;
 
   out:
-
+	TALLOC_FREE(consumed_path);
 	TALLOC_FREE(frame);
 	return status;
 }
-- 
2.14.4



More information about the samba-technical mailing list