s3: smbd: Fix fsp/fd leak when looking up a non-existent stream name on a file.
commitec6a057e6908408c7d64f6da7e5b11503d14a144
authorJeremy Allison <jra@samba.org>
Tue, 28 Feb 2023 19:20:12 +0000 (28 11:20 -0800)
committerJule Anger <janger@samba.org>
Wed, 8 Mar 2023 10:11:41 +0000 (8 10:11 +0000)
treea10f89e5cbc6562cdaf0a4e8fb92f3f08429e167
parent460bc1897a3031728a505e660155f55a0762e5c8
s3: smbd: Fix fsp/fd leak when looking up a non-existent stream name on a file.

When open_stream_pathref_fsp() returns
NT_STATUS_OBJECT_NAME_NOT_FOUND, smb_fname_rel->fsp
has been set to NULL, so we must free base_fsp separately
to prevent fd-leaks when opening a stream that doesn't
exist.

Remove knownfail.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15314

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Mar  3 16:37:27 UTC 2023 on atb-devel-224

(cherry picked from commit 3f84a6df4546e0f1e62dfbcd0b823ea29499a787)

Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Wed Mar  8 10:11:41 UTC 2023 on sn-devel-184
selftest/knownfail.d/stream_rename [deleted file]
source3/smbd/filename.c