mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
Modules: fix thread safe context creation crash.
See #6525, this likely creates a NULL deference if the client was terminated by Redis between the creation of the blocked client and the creation of the thread safe context.
This commit is contained in:
parent
1ee195d255
commit
fdaea2a7a7
1 changed files with 1 additions and 1 deletions
|
|
@ -4463,7 +4463,7 @@ RedisModuleCtx *RM_GetThreadSafeContext(RedisModuleBlockedClient *bc) {
|
|||
ctx->client = createClient(NULL);
|
||||
if (bc) {
|
||||
selectDb(ctx->client,bc->dbid);
|
||||
ctx->client->id = bc->client->id;
|
||||
if (bc->client) ctx->client->id = bc->client->id;
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue