mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Merge pull request #3648 from dvirsky/fix_reply_crash
fix memory corruption on RM_FreeCallReply
This commit is contained in:
commit
3c4fe59e09
@ -2286,8 +2286,10 @@ void RM_FreeCallReply_Rec(RedisModuleCallReply *reply, int freenested){
|
||||
* to have the first level function to return on nested replies, but only
|
||||
* if called by the module API. */
|
||||
void RM_FreeCallReply(RedisModuleCallReply *reply) {
|
||||
|
||||
RedisModuleCtx *ctx = reply->ctx;
|
||||
RM_FreeCallReply_Rec(reply,0);
|
||||
autoMemoryFreed(reply->ctx,REDISMODULE_AM_REPLY,reply);
|
||||
autoMemoryFreed(ctx,REDISMODULE_AM_REPLY,reply);
|
||||
}
|
||||
|
||||
/* Return the reply type. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user