diff options
author | root <root> | 2008-02-05 23:56:33 +0000 |
---|---|---|
committer | root <root> | 2008-02-05 23:56:33 +0000 |
commit | a82219690a0ce1703abdc9bf10d0d4e5a9d26efa (patch) | |
tree | 01acffca4a20ad9b7a99e2fae33c1e998e8326ff /ev.c | |
parent | c83c7b9d34c4856e08c50a4a6c1417cdb2704348 (diff) |
compile without it, too, fix memleak
Diffstat (limited to 'ev.c')
-rw-r--r-- | ev.c | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -849,6 +849,7 @@ pipecb (EV_P_ ev_io *iow, int revents) ev_feed_signal_event (EV_A_ signum + 1); } +#if EV_ASYNC_ENABLE if (gotasync) { int i; @@ -861,6 +862,7 @@ pipecb (EV_P_ ev_io *iow, int revents) ev_feed_event (EV_A_ asyncs [i], EV_ASYNC); } } +#endif } /*****************************************************************************/ @@ -1081,13 +1083,19 @@ loop_init (EV_P_ unsigned int flags) } #endif - ev_rt_now = ev_time (); - mn_now = get_clock (); - now_floor = mn_now; - rtmn_diff = ev_rt_now - mn_now; + ev_rt_now = ev_time (); + mn_now = get_clock (); + now_floor = mn_now; + rtmn_diff = ev_rt_now - mn_now; io_blocktime = 0.; timeout_blocktime = 0.; + backend = 0; + backend_fd = -1; + gotasync = 0; +#if EV_USE_INOTIFY + fs_fd = -2; +#endif /* pid check not overridable via env */ #ifndef _WIN32 @@ -1103,12 +1111,6 @@ loop_init (EV_P_ unsigned int flags) if (!(flags & 0x0000ffffUL)) flags |= ev_recommended_backends (); - backend = 0; - backend_fd = -1; -#if EV_USE_INOTIFY - fs_fd = -2; -#endif - #if EV_USE_PORT if (!backend && (flags & EVBACKEND_PORT )) backend = port_init (EV_A_ flags); #endif @@ -1189,6 +1191,9 @@ loop_destroy (EV_P) #endif array_free (prepare, EMPTY); array_free (check, EMPTY); +#if EV_ASYNC_ENABLE + array_free (async, EMPTY); +#endif backend = 0; } |