Update hfs.c

Fixed unclosed file handles