From f83a89f82a30d4edbd8068172bc54e0f1fe0cc25 Mon Sep 17 00:00:00 2001 From: John Sully Date: Tue, 30 Jul 2019 16:54:25 -0400 Subject: [PATCH] Acquire the lock for modules that don't acquire it before calling like they are supposed to --- src/module.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/module.cpp b/src/module.cpp index 8d935c0cc..f071ae4e1 100644 --- a/src/module.cpp +++ b/src/module.cpp @@ -3920,7 +3920,9 @@ RedisModuleCtx *RM_GetThreadSafeContext(RedisModuleBlockedClient *bc) { /* Release a thread safe context. */ void RM_FreeThreadSafeContext(RedisModuleCtx *ctx) { + moduleAcquireGIL(false /*fServerThread*/); moduleFreeContext(ctx); + moduleReleaseGIL(false /*fServerThread*/); zfree(ctx); }