diff options
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; |