diff options
author | Stefan Metzmacher <metze@samba.org> | 2020-12-21 15:31:25 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2021-01-14 11:30:38 +0000 |
commit | 9b1dc2a4ca61aaa96c3e731a7a59da2a21aa522d (patch) | |
tree | ebc21c22b1abeadb8e6787681c27a4633c5512e7 /source3 | |
parent | 8d79764ad3ed75cddec1568d74cbfd3d41e018be (diff) | |
download | samba-9b1dc2a4ca61aaa96c3e731a7a59da2a21aa522d.tar.gz |
s3:smbd: make sure openat_pathref_fsp() calls fd_close(fsp->base_fsp);
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/files.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 122afa4f3d6..bb61fd49c9c 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -479,10 +479,10 @@ NTSTATUS openat_pathref_fsp(const struct files_struct *dirfsp, nt_errstr(status)); if (fsp->base_fsp != NULL) { + fd_close(fsp->base_fsp); file_free(NULL, fsp->base_fsp); fsp->base_fsp = NULL; } - fd_close(fsp); file_free(NULL, fsp); fsp = NULL; @@ -547,6 +547,7 @@ fail: return status; } if (fsp->base_fsp != NULL) { + fd_close(fsp->base_fsp); file_free(NULL, fsp->base_fsp); fsp->base_fsp = NULL; } |