diff --git a/src/node_zlib.cc b/src/node_zlib.cc index bb149629c92f2f..31241e10c391db 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -541,6 +541,7 @@ class ZCtx : public AsyncWrap { delete[] dictionary; ctx->dictionary_ = nullptr; } + ctx->mode_ = NONE; ctx->env()->ThrowError("Init error"); } }