From: Stefan Metzmacher Date: Fri, 18 Dec 2020 13:36:00 +0000 (+0100) Subject: vfs_streams_xattr: make use of vfs_fake_fd_close() X-Git-Tag: samba-4.14.0rc1~136 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40e70cbd3c3a1df9205a7b18d07784c1754cc340;p=thirdparty%2Fsamba.git 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 --- diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index b838878d4b3..72032824b93 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -488,7 +488,7 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle, fail: if (fakefd >= 0) { - close(fakefd); + vfs_fake_fd_close(fakefd); fakefd = -1; } @@ -510,7 +510,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_set_fd(fsp, -1); return ret;