From 1f55170b9c480130d1dd120358ff715379e8cbd4 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 24 Nov 2016 11:05:19 +0100 Subject: [PATCH] Modules: fix client blocking calls access to invalid struct field. We already have reference to the client pointer, no need to access the already freed structure. Close #3634. --- src/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module.c b/src/module.c index 876513cb..07f88eff 100644 --- a/src/module.c +++ b/src/module.c @@ -3183,7 +3183,7 @@ void moduleHandleBlockedClients(void) { if (bc->privdata && bc->free_privdata) bc->free_privdata(bc->privdata); zfree(bc); - if (c != NULL) unblockClient(bc->client); + if (c != NULL) unblockClient(c); /* Lock again before to iterate the loop. */ pthread_mutex_lock(&moduleUnblockedClientsMutex);