Skip to content

Commit 497fd72

Browse files
rlidwkarvagg
authored andcommitted
fs: fix fd leak in ReadStream.destroy()
PR-URL: #56 Reviewed-By: Rod Vagg <[email protected]> See PR for long discussion
1 parent 8b09ae7 commit 497fd72

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/fs.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1668,9 +1668,7 @@ ReadStream.prototype.destroy = function() {
16681668
if (this.destroyed)
16691669
return;
16701670
this.destroyed = true;
1671-
1672-
if (util.isNumber(this.fd))
1673-
this.close();
1671+
this.close();
16741672
};
16751673

16761674

0 commit comments

Comments
 (0)