From 1bd5ffc109b426903aca8bb913dc504e3e8dbb0d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 18 Dec 2020 14:36:00 +0100 Subject: [PATCH] vfs_streams_xattr: make use of vfs_fake_fd_close() When we used vfs_fake_fd() we should use vfs_fake_fd_close() in order to have things symetric. That may allows us to change vfs_fake_fd() internally if required. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Reviewed-by: Jeremy Allison (back-ported from commit 40e70cbd3c3a1df9205a7b18d07784c1754cc340) --- source3/modules/vfs_streams_xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index 85efe2bcc37..7d0617507e3 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -490,7 +490,7 @@ static int streams_xattr_open(vfs_handle_struct *handle, fail: if (fakefd >= 0) { - close(fakefd); + vfs_fake_fd_close(fakefd); fakefd = -1; } @@ -512,7 +512,7 @@ static int streams_xattr_close(vfs_handle_struct *handle, return SMB_VFS_NEXT_CLOSE(handle, fsp); } - ret = close(fd); + ret = vfs_fake_fd_close(fd); fsp->fh->fd = -1; return ret; -- 2.11.4.GIT