summaryrefslogtreecommitdiff
path: root/source3/libsmb
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
parentb77becdb55da195da6932a289b8cdc7d2e1dd4dc (diff)
downloadsamba-2453164317e350fd398858a84b6ef5e030faab1b.tar.gz
samba-2453164317e350fd398858a84b6ef5e030faab1b.tar.bz2
samba-2453164317e350fd398858a84b6ef5e030faab1b.zip
s3:libsmb: use a talloc_stackframe in cli_dfs_get_referral()
metze
Diffstat (limited to 'source3/libsmb')
-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;
}