]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: open_internal_dirfsp() add missing file_free() in error path.
authorJeremy Allison <jra@samba.org>
Fri, 18 Mar 2022 19:00:15 +0000 (12:00 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 24 Mar 2022 16:28:37 +0000 (16:28 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15022

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/files.c

index 5c0525441caf7d0adfe237f7203fdaac769fbc05..6062a41902fe8275d78b2b49a9b7acdced52e3ec 100644 (file)
@@ -266,6 +266,7 @@ NTSTATUS open_internal_dirfsp(connection_struct *conn,
 
        ret = SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st);
        if (ret != 0) {
+               file_free(NULL, fsp);
                return map_nt_error_from_unix(errno);
        }