diff --git a/src/ev_poll.c b/src/ev_poll.c index 538f07057..8df244566 100644 --- a/src/ev_poll.c +++ b/src/ev_poll.c @@ -286,7 +286,6 @@ static int _do_init(struct poller *p) fail_swevt: free(fd_evts[DIR_RD]); fail_srevt: - free(poll_events); p->pref = 0; return 0; } diff --git a/src/ev_select.c b/src/ev_select.c index ab021b97f..acfdbb94a 100644 --- a/src/ev_select.c +++ b/src/ev_select.c @@ -255,7 +255,7 @@ static int _do_init(struct poller *p) p->private = NULL; if (global.maxsock > FD_SETSIZE) - goto fail_revt; + goto fail_srevt; fd_set_bytes = sizeof(fd_set) * (global.maxsock + FD_SETSIZE - 1) / FD_SETSIZE; @@ -272,9 +272,6 @@ static int _do_init(struct poller *p) fail_swevt: free(fd_evts[DIR_RD]); fail_srevt: - free(tmp_evts[DIR_WR]); - free(tmp_evts[DIR_RD]); - fail_revt: p->pref = 0; return 0; }