Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aeDeleteEventLoop() release aeTimeEvents to avoid memory leak #2426

Open
wants to merge 3 commits into
base: unstable
Choose a base branch
from

Conversation

sunheehnus
Copy link
Contributor

ae.c/aeDeleteEventLoop: release aeTimeEvents

We malloc memory for registeing aeTimeEvent,
we should also release them to avoid leaking.

Release aeTimeEvents to avoid memory leak.
Set eventLoop->timeEventNextId to the events registered
by event handlers itself to avoid loop forever.
@sunheehnus
Copy link
Contributor Author

The second commit just meet the condition if (te->id > maxId) and comments above, to avoid loop forever.

When time is past, tv_sec & tv_usec should all be set to 0
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants