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:58:32 +0000 (18:58 -0700)
commit72cc66e5033ea8900582da5a19b4032d8120e24c
treebe59c96340127e4b8610cef1fff344e4d09af27d
parentc862c0348530824bfacef8eadfaf448120d91664
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