Commit 0d02515
zlib: do not unref() if wasn't ref()ed
In very unlikely case, where `deflateInit2()` may return error (right
now happening only on exhausting all memory), the `ZCtx::Error()` will
be called and will try to `Unref()` the handle. But the problem is that
this handle was never `Ref()`ed, so it will trigger an assertion error
and crash the program.
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: nodejs/node-v0.x-archive#8687
Cherry-picked-from: nodejs/node-v0.x-archive@8c868981 parent 4481cf7 commit 0d02515
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
361 | 363 | | |
362 | | - | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
| |||
0 commit comments