summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-08-07 16:19:06 -0700
committerStefan Metzmacher <metze@samba.org>2013-08-15 09:07:07 +0200
commitc1aeada4dd1f165eb33354c5a4323ed1ebf453a9 (patch)
tree7498b01e9c40e9c053c70aeaa1201dee393f3bb9 /source3/libsmb
parentc6ed0b88312d7e231749a09a87944caea4c9808e (diff)
downloadsamba-c1aeada4dd1f165eb33354c5a4323ed1ebf453a9.tar.gz
samba-c1aeada4dd1f165eb33354c5a4323ed1ebf453a9.tar.bz2
samba-c1aeada4dd1f165eb33354c5a4323ed1ebf453a9.zip
s3:libsmb: Fix cli_set_ea_path() to use frame instead of talloc_tos().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clifile.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 77796d883c..5cd1ff2e67 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -4322,9 +4322,10 @@ NTSTATUS cli_set_ea_path(struct cli_state *cli, const char *path,
NTSTATUS status;
TALLOC_CTX *frame = talloc_stackframe();
- param = talloc_array(talloc_tos(), uint8_t, 6);
+ param = talloc_array(frame, uint8_t, 6);
if (!param) {
- return NT_STATUS_NO_MEMORY;
+ status = NT_STATUS_NO_MEMORY;
+ goto fail;
}
SSVAL(param,0,SMB_INFO_SET_EA);
SSVAL(param,2,0);
@@ -4337,7 +4338,10 @@ NTSTATUS cli_set_ea_path(struct cli_state *cli, const char *path,
status = cli_set_ea(cli, TRANSACT2_SETPATHINFO, param, param_len,
ea_name, ea_val, ea_len);
- talloc_free(frame);
+
+ fail:
+
+ TALLOC_FREE(frame);
return status;
}