Skip to content

Instantly share code, notes, and snippets.

@piscisaureus
Created January 10, 2012 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piscisaureus/1590237 to your computer and use it in GitHub Desktop.
Save piscisaureus/1590237 to your computer and use it in GitHub Desktop.
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index 7c07ef3..952fc26 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -125,7 +125,7 @@ template <node_zlib_mode mode> class ZCtx : public ObjectWrap {
ctx->chunk_size_ = out_len;
// build up the work request
- uv_work_t* work_req = new uv_work_t();
+ uv_work_t* work_req = &req_wrap->req_;
work_req->data = req_wrap;
uv_queue_work(uv_default_loop(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment