From b394817754ade6151f40b64115f9fbe03a9ca09b Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 27 Sep 2019 18:32:52 +0200 Subject: [PATCH] Fix memory leak in RM_UnregisterCommandFilter(). --- src/module.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/module.c b/src/module.c index 217478705..98d4db97f 100644 --- a/src/module.c +++ b/src/module.c @@ -5036,6 +5036,8 @@ int RM_UnregisterCommandFilter(RedisModuleCtx *ctx, RedisModuleCommandFilter *fi if (!ln) return REDISMODULE_ERR; /* Shouldn't happen */ listDelNode(ctx->module->filters,ln); + zfree(filter); + return REDISMODULE_OK; }