From 169e7d24d88061c6a874ba4d1ee6c86d2efa2bc9 Mon Sep 17 00:00:00 2001 From: Ralph Wuerthner Date: Thu, 10 Jan 2019 14:28:14 +0100 Subject: [PATCH] vfs_fileid: fix get_connectpath_ino Bug: https://bugzilla.samba.org/show_bug.cgi?id=13741 Signed-off-by: Ralph Wuerthner Reviewed-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue Jan 15 04:13:15 CET 2019 on sn-devel-144 (cherry picked from commit 12398a2d1ddcd326e02e5d8b0749e0e796145165) --- source3/modules/vfs_fileid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/modules/vfs_fileid.c b/source3/modules/vfs_fileid.c index 5d08fe9..cb77a2e 100644 --- a/source3/modules/vfs_fileid.c +++ b/source3/modules/vfs_fileid.c @@ -297,12 +297,14 @@ static int get_connectpath_ino(struct vfs_handle_struct *handle, } ret = SMB_VFS_NEXT_STAT(handle, fname); - TALLOC_FREE(fname); if (ret != 0) { DBG_ERR("stat failed for %s with %s\n", handle->conn->connectpath, strerror(errno)); + TALLOC_FREE(fname); return -1; } + *ino = fname->st.st_ex_ino; + TALLOC_FREE(fname); return 0; } -- 2.7.4