Commit c589b6b
authored andcommitted
http2: fix FileHandle leak in respondWithFile
Ensure that the file handle is closed if header validation fails in
respondWithFile. This prevents ERR_INVALID_STATE errors where a
FileHandle object is closed during garbage collection.
PR-URL: #61707
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>1 parent e7173a0 commit c589b6b
File tree
2 files changed
+55
-0
lines changed- lib/internal/http2
- test/parallel
2 files changed
+55
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
2680 | 2680 | | |
2681 | 2681 | | |
2682 | 2682 | | |
| 2683 | + | |
| 2684 | + | |
2683 | 2685 | | |
2684 | 2686 | | |
2685 | 2687 | | |
| |||
2693 | 2695 | | |
2694 | 2696 | | |
2695 | 2697 | | |
| 2698 | + | |
| 2699 | + | |
2696 | 2700 | | |
2697 | 2701 | | |
2698 | 2702 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
0 commit comments