diff --git a/src/module.c b/src/module.c index 2c90c599a..d29b2e3f1 100644 --- a/src/module.c +++ b/src/module.c @@ -609,6 +609,8 @@ void moduleHandlePropagationAfterCommandCallback(RedisModuleCtx *ctx) { redisOpArrayFree(&server.also_propagate); /* Restore the previous oparray in case of nexted use of the API. */ server.also_propagate = ctx->saved_oparray; + /* We're done with saved_oparray, let's invalidate it. */ + redisOpArrayInit(&ctx->saved_oparray); } }