]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Add missing lock free and file close in error path.
authorJeremy Allison <jra@samba.org>
Fri, 29 Jan 2021 19:38:07 +0000 (11:38 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 1 Feb 2021 18:38:23 +0000 (18:38 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Feb  1 18:38:23 UTC 2021 on sn-devel-184

source3/smbd/open.c

index faf1c67a5ea934f801b43777423a356a26c6d1ec..721a48f3b5a6d5f952e8ef1a47f336f6be14060d 100644 (file)
@@ -4035,6 +4035,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
                                            nt_errstr(status));
                        }
                }
+               TALLOC_FREE(lck);
+               fd_close(fsp);
                return NT_STATUS_NO_MEMORY;
        }