summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/clidfs.c7
1 files changed, 3 insertions, 4 deletions
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;
}