diff options
author | qi.yang <q_yang1987@163.com> | 2019-05-30 15:03:38 +0800 |
---|---|---|
committer | qi.yang <q_yang1987@163.com> | 2019-05-30 15:03:38 +0800 |
commit | 918e24c83b2a6cecea089d1c335acb98b5c593e3 (patch) | |
tree | e7f65762a65cfff73131a24762d1e8c58203ab17 /read.c | |
parent | f5f855c91239706b173e2412cea301f4a3643e2d (diff) |
redisReaderGetReply leak memory
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -590,8 +590,11 @@ int redisReaderGetReply(redisReader *r, void **reply) { /* Emit a reply when there is one. */ if (r->ridx == -1) { - if (reply != NULL) + if (reply != NULL) { *reply = r->reply; + } else if (r->reply != NULL && r->fn && r->fn->freeObject) { + r->fn->freeObject(r->reply); + } r->reply = NULL; } return REDIS_OK; |