Skip to content

Commit

Permalink
Move freeing of event_loop_wakeup to after uv_loop_close
Browse files Browse the repository at this point in the history
  • Loading branch information
Madeleine Goebel authored and bdw committed May 24, 2019
1 parent dc3f36c commit 6bc095d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/io/eventloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ void MVM_io_eventloop_destroy(MVMThreadContext *tc) {

if (instance->event_loop) {
uv_close((uv_handle_t*)instance->event_loop_wakeup, NULL);
MVM_free(instance->event_loop_wakeup);
instance->event_loop_wakeup = NULL;

/* Not sure we can always do this */
uv_loop_close(instance->event_loop);
MVM_free(instance->event_loop_wakeup);
MVM_free(instance->event_loop);
instance->event_loop = NULL;
}
Expand Down

0 comments on commit 6bc095d

Please sign in to comment.