summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ae.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ae.c b/src/ae.c
index 2c1dae512..248096e1f 100644
--- a/src/ae.c
+++ b/src/ae.c
@@ -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);
}