fs: close file if fstat() fails in readFile()
authorcjihrig <cjihrig@gmail.com>
Wed, 28 May 2014 22:34:04 +0000 (18:34 -0400)
committerBert Belder <bertbelder@gmail.com>
Thu, 29 May 2014 01:57:55 +0000 (18:57 -0700)
commitc7b02034ef80313564c50c59c63a5b640c24e234
tree4b92cef07851467e97c250cd0d5e9afcc0d9822c
parent57c56558858f8348f938194c7fe563574cc46fd6
fs: close file if fstat() fails in readFile()

Currently, if fstat() fails in readFile(), the callback
is invoked without closing the file. This commit closes
the file before calling back.

Closes #7697
lib/fs.js