free time event when delete eventloop

This commit is contained in:
wangyuan21 2019-12-31 19:53:00 +08:00 committed by antirez
parent ecf3b2ef32
commit dd4798802c

View File

@ -135,6 +135,13 @@ void aeDeleteEventLoop(aeEventLoop *eventLoop) {
aeApiFree(eventLoop);
zfree(eventLoop->events);
zfree(eventLoop->fired);
/* Free time event. */
aeTimeEvent *next_te, *te = eventLoop->timeEventHead;
while (te) {
next_te = te->next;
zfree(te);
te = next_te;
}
zfree(eventLoop);
}