From 3d551e5538d98c7d049904c29124d168b2e4a6e4 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 10 Aug 2010 14:47:40 -0700 Subject: [PATCH] Close fd on readFile(emptyfile) --- lib/fs.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/fs.js b/lib/fs.js index 5fb19509e2..6fc0e5f798 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -55,6 +55,7 @@ fs.readFile = function (path, encoding_, callback) { var offset = 0; function doRead() { if (size < 1) { + binding.close(fd); callback(null, buffer); return; }