Skip to content

Commit

Permalink
SvREFCNT_inc/dec is required here
Browse files Browse the repository at this point in the history
  • Loading branch information
typester committed Oct 4, 2012
1 parent 457b6d1 commit 6f91d20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/UV.xs
Expand Up @@ -680,7 +680,7 @@ static void timer_cb(uv_timer_t* handle, int status) {
}

static void walk_cb(uv_handle_t* handle, void* arg) {
SV* sv_handle = SvREFCNT_inc(sv_handle_wrap(handle));
SV* sv_handle = sv_handle_wrap(handle);

dSP;

Expand Down Expand Up @@ -900,7 +900,8 @@ void
uv_walk(SV* cb)
CODE:
{
uv_walk(uv_default_loop(), walk_cb, cb);
uv_walk(uv_default_loop(), walk_cb, SvREFCNT_inc(cb));
SvREFCNT_dec(cb);
}

void
Expand Down

0 comments on commit 6f91d20

Please sign in to comment.