tuxera / ntfs-3g

NTFS-3G Safe Read/Write NTFS Driver
https://www.tuxera.com/company/open-source
GNU General Public License v2.0
999 stars 149 forks source link

ntfscluster does not close inode when dumping info from path #94

Open mike309game opened 1 year ago

mike309game commented 1 year ago

When using ntfscluster to show info about a file path, the opened inode handle is not closed.

Simply changing https://github.com/tuxera/ntfs-3g/blob/75dcdc2cf37478fad6c0e3427403d198b554951d/ntfsprogs/ntfscluster.c#L538-L539 to

if (ino)
    result = dump_file(vol, ino);
    ntfs_inode_close(ino);

will properly close it.