From 33ea432585fa3d7ca3da1de98b64e7267110ad4b Mon Sep 17 00:00:00 2001 From: Binbin Date: Sun, 3 Mar 2024 15:20:18 +0800 Subject: [PATCH] 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. --- src/ae.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ae.c b/src/ae.c index 453bea2c5..99c0b8600 100644 --- a/src/ae.c +++ b/src/ae.c @@ -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; }