Unverified Commit a1f99297 authored by Anna Henningsen's avatar Anna Henningsen Committed by Myles Borins
Browse files

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: https://github.com/nodejs/node/issues/14178
Ref: https://github.com/nodejs/node/pull/13098
Backport-PR-URL: https://github.com/nodejs/node/pull/14860
PR-URL: https://github.com/nodejs/node/pull/14666


Reviewed-By: default avatarRefael Ackermann <refack@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarAlexey Orlenko <eaglexrlnk@gmail.com>
parent 31bf595b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment