Commit b3e5d52
buffer: do not leak memory if buffer is too big
A recent pull request changed this method to throw when the buffer was
too big, but this meant that the `free` finalizer would never get
called, leading to a memory leak.
A previous version of this diff included a test provoking this behavior
with `v8.serialize`, but it unfortunately kept triggering the OOM
killer, so it was removed.
Refs: nodejs/node#40243
PR-URL: nodejs/node#43938
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>1 parent 433c99a commit b3e5d52
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
| 500 | + | |
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
| |||
0 commit comments