diff --git a/src/scan.l b/src/scan.l index a026b319f5..4fd2aac1c3 100644 --- a/src/scan.l +++ b/src/scan.l @@ -90,7 +90,10 @@ static ino_t get_inode_num(const string& path) if ( ! f ) reporter->FatalError("failed to open %s\n", path.c_str()); - return get_inode_num(f, path); + ino_t inum = get_inode_num(f, path); + fclose(f); + + return inum; } class FileInfo {