mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
fix memory leak in example module hellocluster (#9813)
Missing RedisModule_FreeCallReply
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user