1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-24 10:50:22 +03:00

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>
This commit is contained in:
Jeremy Allison 2022-01-24 16:29:27 -08:00
parent 65774b5176
commit 1224d463e8

View File

@ -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;
}