Browse Source

free toBuffer closure data

v1.x
Tj Holowaychuk 14 years ago
parent
commit
6107a2ad89
  1. 5
      src/Canvas.cc

5
src/Canvas.cc

@ -166,7 +166,8 @@ EIO_AfterToBuffer(eio_req *req) {
}
closure->pfn.Dispose();
delete closure;
free(closure->data);
free(closure);
return 0;
}
@ -182,7 +183,7 @@ Canvas::ToBuffer(const Arguments &args) {
// Async
if (args[0]->IsFunction()) {
closure_t *closure = new closure_t;
closure_t *closure = (closure_t *) malloc(sizeof(closure_t));
closure->len = 0;
closure->canvas = canvas;
// TODO: only one callback fn in closure

Loading…
Cancel
Save