summaryrefslogtreecommitdiff
path: root/source3/libsmb/clidfs.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-07 08:58:25 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-07 19:16:27 +0200
commit2453164317e350fd398858a84b6ef5e030faab1b (patch)
tree56a475c209120d3e4b5e3fb1387bbf4adc2a97c1 /source3/libsmb/clidfs.c
parentb77becdb55da195da6932a289b8cdc7d2e1dd4dc (diff)
downloadsamba-2453164317e350fd398858a84b6ef5e030faab1b.tar.gz
s3:libsmb: use a talloc_stackframe in cli_dfs_get_referral()
metze
Diffstat (limited to 'source3/libsmb/clidfs.c')
-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 2287812c188..5d97cd3011a 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;
}