Unverified Commit b567d369 authored by RuiliF's avatar RuiliF Committed by GitHub
Browse files

fix memory leak in example module hellocluster (#9813)

Missing RedisModule_FreeCallReply
parent 366d5101
...@@ -77,7 +77,8 @@ void PingReceiver(RedisModuleCtx *ctx, const char *sender_id, uint8_t type, cons ...@@ -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'", RedisModule_Log(ctx,"notice","PING (type %d) RECEIVED from %.*s: '%.*s'",
type,REDISMODULE_NODE_ID_LEN,sender_id,(int)len, payload); type,REDISMODULE_NODE_ID_LEN,sender_id,(int)len, payload);
RedisModule_SendClusterMessage(ctx,NULL,MSGTYPE_PONG,(unsigned char*)"Ohi!",4); 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. */ /* Callback for message MSGTYPE_PONG. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment