summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2022-01-24 16:29:27 -0800
committerJeremy Allison <jra@samba.org>2022-01-25 20:51:36 +0000
commit1224d463e8e067786541d7c36f8a6045e43eb831 (patch)
tree0eef50a302a6ef6fb7c9c19c05db14d4e02ad2ca /source3
parent65774b51766e1329d7a7ddd7409e7f4717f65986 (diff)
downloadsamba-1224d463e8e067786541d7c36f8a6045e43eb831.tar.gz
s3: smbd: Cleanup - In smbd_do_query_security_desc() we don't need a talloc frame.
Just free the marshalled sd before returning. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Mulder <dmulder@suse.com>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/nttrans.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 61f1fee8462..4dcd4000b84 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -2262,19 +2262,17 @@ NTSTATUS smbd_do_query_security_desc(connection_struct *conn,
{
NTSTATUS status;
struct security_descriptor *psd = NULL;
- TALLOC_CTX *frame = talloc_stackframe();
/*
* Get the permissions to return.
*/
status = smbd_fetch_security_desc(conn,
- frame,
+ mem_ctx,
fsp,
security_info_wanted,
&psd);
if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(frame);
return status;
}
@@ -2284,7 +2282,7 @@ NTSTATUS smbd_do_query_security_desc(connection_struct *conn,
max_data_count,
ppmarshalled_sd,
psd_size);
- TALLOC_FREE(frame);
+ TALLOC_FREE(psd);
return status;
}