mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
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:
parent
5b7d42fff3
commit
1f55170b9c
@ -3183,7 +3183,7 @@ void moduleHandleBlockedClients(void) {
|
|||||||
if (bc->privdata && bc->free_privdata)
|
if (bc->privdata && bc->free_privdata)
|
||||||
bc->free_privdata(bc->privdata);
|
bc->free_privdata(bc->privdata);
|
||||||
zfree(bc);
|
zfree(bc);
|
||||||
if (c != NULL) unblockClient(bc->client);
|
if (c != NULL) unblockClient(c);
|
||||||
|
|
||||||
/* Lock again before to iterate the loop. */
|
/* Lock again before to iterate the loop. */
|
||||||
pthread_mutex_lock(&moduleUnblockedClientsMutex);
|
pthread_mutex_lock(&moduleUnblockedClientsMutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user