diff options
author | wangyuan21 <wangyuan21@baidu.com> | 2019-12-31 19:53:00 +0800 |
---|---|---|
committer | wangyuan21 <wangyuan21@baidu.com> | 2019-12-31 19:57:02 +0800 |
commit | 3848849013e6ec7efa244897f5fdebb843fcfaa4 (patch) | |
tree | 8661c13d894d2321c26c495cff50b31574c65cdb /src/ae.c | |
parent | 6e4f70b8170e14ba8a2ada2fde4a75e073effee3 (diff) | |
download | redis-3848849013e6ec7efa244897f5fdebb843fcfaa4.tar.gz |
free time event when delete eventloop
Diffstat (limited to 'src/ae.c')
-rw-r--r-- | src/ae.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); } |