Skip to content

Commit

Permalink
zero closure
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Mar 11, 2011
1 parent fde7404 commit 1c6cfd3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Canvas.cc
Expand Up @@ -188,6 +188,7 @@ Canvas::ToBuffer(const Arguments &args) {
// Async
if (args[0]->IsFunction()) {
closure_t *closure = (closure_t *) malloc(sizeof(closure_t));
memset(closure, 0, sizeof(closure));
closure->len = 0;
closure->canvas = canvas;
// TODO: only one callback fn in closure
Expand Down

0 comments on commit 1c6cfd3

Please sign in to comment.