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.
This commit is contained in:
antirez 2016-11-24 11:05:19 +01:00
parent 5b7d42fff3
commit 1f55170b9c

View File

@ -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);