summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
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;
}