Skip to content

Commit f83a89f

Browse files
committed
Acquire the lock for modules that don't acquire it before calling like they are supposed to
1 parent bf905a7 commit f83a89f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/module.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3920,7 +3920,9 @@ RedisModuleCtx *RM_GetThreadSafeContext(RedisModuleBlockedClient *bc) {
39203920

39213921
/* Release a thread safe context. */
39223922
void RM_FreeThreadSafeContext(RedisModuleCtx *ctx) {
3923+
moduleAcquireGIL(false /*fServerThread*/);
39233924
moduleFreeContext(ctx);
3925+
moduleReleaseGIL(false /*fServerThread*/);
39243926
zfree(ctx);
39253927
}
39263928

0 commit comments

Comments
 (0)