]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Remove a temp variable used only once
authorVolker Lendecke <vl@samba.org>
Sat, 13 Sep 2025 09:50:24 +0000 (11:50 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 21 Oct 2025 17:33:29 +0000 (17:33 +0000)
We use talloc_tos() as function argument in a lot of places already.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_trans2.c

index 6f4888124635a28627b7cf547bf641aeabf17ed2..6e8da40794df2b2a43264cc256fe666c7982dacf 100644 (file)
@@ -4056,7 +4056,6 @@ static NTSTATUS smb_info_set_ea(connection_struct *conn,
                                struct smb_filename *smb_fname)
 {
        struct ea_list *ea_list = NULL;
-       TALLOC_CTX *ctx = NULL;
        NTSTATUS status = NT_STATUS_OK;
 
        if (total_data < 10) {
@@ -4078,8 +4077,7 @@ static NTSTATUS smb_info_set_ea(connection_struct *conn,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       ctx = talloc_tos();
-       ea_list = read_ea_list(ctx, pdata + 4, total_data - 4);
+       ea_list = read_ea_list(talloc_tos() , pdata + 4, total_data - 4);
        if (!ea_list) {
                return NT_STATUS_INVALID_PARAMETER;
        }