From 863ae63e2cc3ba04d76ed34b110d5d8b67b41268 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 Former-commit-id: 6016dd0f8b68ceeeb161a39a0d531a3cc52d78d8 --- src/module.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/module.cpp b/src/module.cpp index b2c19c735..1d00d2b1d 100644 --- a/src/module.cpp +++ b/src/module.cpp @@ -3939,7 +3939,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); }