From 2453164317e350fd398858a84b6ef5e030faab1b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 7 Jul 2011 08:58:25 +0200 Subject: s3:libsmb: use a talloc_stackframe in cli_dfs_get_referral() metze --- source3/libsmb/clidfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 2287812c18..5d97cd3011 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -621,13 +621,14 @@ NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx, uint16 num_referrals; struct client_dfs_referral *referrals = NULL; NTSTATUS status; + TALLOC_CTX *frame = talloc_stackframe(); *num_refs = 0; *refs = NULL; SSVAL(setup, 0, TRANSACT2_GET_DFS_REFERRAL); - param = SMB_MALLOC_ARRAY(uint8_t, 2+pathlen+2); + param = talloc_array(talloc_tos(), uint8_t, 2+pathlen+2); if (!param) { status = NT_STATUS_NO_MEMORY; goto out; @@ -746,9 +747,7 @@ NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx, out: - TALLOC_FREE(consumed_path); - SAFE_FREE(param); - TALLOC_FREE(rdata); + TALLOC_FREE(frame); return status; } -- cgit