diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2016-11-30 11:21:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-30 11:21:10 +0100 |
commit | 3c4fe59e095d1ff06cf5f99706c357a0c6f7b5b1 (patch) | |
tree | ea44ef6f5ca9d224cbb8d91d89377c160226d495 /src/module.c | |
parent | 71e8d15e493217df16e82a81fa2c587b64a74ef9 (diff) | |
parent | 8521cde570f574006ee36a2d3e0ed1b2f6953d2f (diff) | |
download | redis-3c4fe59e095d1ff06cf5f99706c357a0c6f7b5b1.tar.gz |
Merge pull request #3648 from dvirsky/fix_reply_crash
fix memory corruption on RM_FreeCallReply
Diffstat (limited to 'src/module.c')
-rw-r--r-- | src/module.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/module.c b/src/module.c index 36e23a47c..52b15fa34 100644 --- a/src/module.c +++ b/src/module.c @@ -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. */ |