Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

unix: zero out new loop struct

Fixes spurious segfaults in pyuv.
  • Loading branch information...
bnoordhuis committed May 4, 2012
1 parent ce129ac commit 6037684ef8b3b1bf88fcf76e2cf5bf4cdc7a5be9
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/unix/loop.c
@@ -33,8 +33,10 @@ int uv__loop_init(uv_loop_t* loop, int default_loop) {
#else
int flags = EVFLAG_AUTO;
#endif
memset(loop, 0, sizeof(*loop));
RB_INIT(&loop->uv_ares_handles_);
loop->endgame_handles = NULL;
loop->channel = NULL;
loop->ev = (default_loop ? ev_default_loop : ev_loop_new)(flags);
ev_set_userdata(loop->ev, loop);
eio_channel_init(&loop->uv_eio_channel, loop);

0 comments on commit 6037684

Please sign in to comment.
You can’t perform that action at this time.