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: https://github.com/joyent/node/pull/8687
parent
f9456a2d
Please register or sign in to comment