zlib: fix crash when initializing failed · nodejs/node@e79c054 · GitHub
Skip to content

Commit e79c054

Browse files
addaleaxMylesBorins
authored andcommitted
zlib: fix crash when initializing failed
Unset `mode_` when initializing the zlib stream failed, so that we don’t try to call the zlib end functions (`deflateEnd()` etc.) when cleaning up in `ZCtx::Close()`. Fixes: #14178 Ref: #13098 PR-URL: #14666 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
1 parent 5ba65f2 commit e79c054

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/node_zlib.cc

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)