vfs_fileid: fix get_connectpath_ino
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>
Thu, 10 Jan 2019 13:28:14 +0000 (14:28 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 15 Jan 2019 03:13:15 +0000 (04:13 +0100)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13741

Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan 15 04:13:15 CET 2019 on sn-devel-144

source3/modules/vfs_fileid.c

index 5d08fe97d1552068b6b6886d447c65c2eae9efc1..cb77a2e52c627e0803c8e837f6ab8c98c76fc77b 100644 (file)
@@ -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;
 }