diff --git a/src/module.c b/src/module.c index 3b90eae4..db3c8dce 100644 --- a/src/module.c +++ b/src/module.c @@ -3217,8 +3217,8 @@ void moduleHandleBlockedClients(void) { } if (bc->privdata && bc->free_privdata) bc->free_privdata(bc->privdata); - zfree(bc); if (c != NULL) unblockClient(c); + zfree(bc); /* Lock again before to iterate the loop. */ pthread_mutex_lock(&moduleUnblockedClientsMutex);