diff options
author | RuiliF <77563179+RuiliF@users.noreply.github.com> | 2021-11-19 17:48:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-20 00:48:08 +0200 |
commit | b567d3694c647455bfe9908696af10dcccb339cd (patch) | |
tree | ce387f3ec70ab11de843ac56fd77caa73ac1cd2c /src/modules | |
parent | 366d5101d3d3c268157860feca6696a64b77fe59 (diff) | |
download | redis-b567d3694c647455bfe9908696af10dcccb339cd.tar.gz |
fix memory leak in example module hellocluster (#9813)
Missing RedisModule_FreeCallReply
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/hellocluster.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/hellocluster.c b/src/modules/hellocluster.c index cb78187f9..ac04f9560 100644 --- a/src/modules/hellocluster.c +++ b/src/modules/hellocluster.c @@ -77,7 +77,8 @@ void PingReceiver(RedisModuleCtx *ctx, const char *sender_id, uint8_t type, cons RedisModule_Log(ctx,"notice","PING (type %d) RECEIVED from %.*s: '%.*s'", type,REDISMODULE_NODE_ID_LEN,sender_id,(int)len, payload); RedisModule_SendClusterMessage(ctx,NULL,MSGTYPE_PONG,(unsigned char*)"Ohi!",4); - RedisModule_Call(ctx, "INCR", "c", "pings_received"); + RedisModuleCallReply *reply = RedisModule_Call(ctx, "INCR", "c", "pings_received"); + RedisModule_FreeCallReply(reply); } /* Callback for message MSGTYPE_PONG. */ |