From a4f03bd7eb44580b44f9499c53417df45e1edfb0 Mon Sep 17 00:00:00 2001 From: guybe7 Date: Thu, 11 Mar 2021 12:50:13 +0100 Subject: [PATCH] Fix some memory leaks in propagagte.c (#8636) Introduced by 3d0b427c30610b45c00b2377ee28bb69974ccea2 --- tests/modules/propagate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/modules/propagate.c b/tests/modules/propagate.c index e07f8efe7..7a63ed807 100644 --- a/tests/modules/propagate.c +++ b/tests/modules/propagate.c @@ -77,7 +77,8 @@ void timerNestedHandler(RedisModuleCtx *ctx, void *data) { /* The goal is the trigger a module command that calls RM_Replicate * in order to test MULTI/EXEC structre */ RedisModule_Replicate(ctx,"INCRBY","cc","timer-nested-start","1"); - RedisModule_Call(ctx,"propagate-test.nested", repl? "!" : ""); + RedisModuleCallReply *reply = RedisModule_Call(ctx,"propagate-test.nested", repl? "!" : ""); + RedisModule_FreeCallReply(reply); RedisModule_Replicate(ctx,"INCRBY","cc","timer-nested-end","1"); } @@ -178,7 +179,8 @@ int propagateTestNestedCommand(RedisModuleCtx *ctx, RedisModuleString **argv, in reply = RedisModule_Call(ctx, "INCR", "c!", "using-call"); RedisModule_FreeCallReply(reply); - RedisModule_Call(ctx,"propagate-test.simple", "!"); + reply = RedisModule_Call(ctx,"propagate-test.simple", "!"); + RedisModule_FreeCallReply(reply); RedisModule_Replicate(ctx,"INCR","c","counter-3"); RedisModule_Replicate(ctx,"INCR","c","counter-4");