util: zero the events pointer to avoid its double free

Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Andrei Vagin 2021-01-20 23:49:28 -08:00
parent 90f043dea7
commit 7d63ceaecd

View file

@ -1323,6 +1323,7 @@ int epoll_prepare(int nr_fds, struct epoll_event **events)
free_events:
xfree(*events);
*events = NULL;
return -1;
}