Call finalizerProc when free the aeTimeEvent in ae (#13101)

Supplement to #6189, we also need to call finalizerProc.
This is a minor cleanup, no one currently uses this finalizerProc
feature.
This commit is contained in:
Binbin 2024-03-03 15:20:18 +08:00 committed by GitHub
parent df75153d79
commit 33ea432585
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,6 +149,8 @@ void aeDeleteEventLoop(aeEventLoop *eventLoop) {
aeTimeEvent *next_te, *te = eventLoop->timeEventHead;
while (te) {
next_te = te->next;
if (te->finalizerProc)
te->finalizerProc(eventLoop, te->clientData);
zfree(te);
te = next_te;
}