summaryrefslogtreecommitdiff
path: root/hiredis.c
diff options
context:
space:
mode:
Diffstat (limited to 'hiredis.c')
-rw-r--r--hiredis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hiredis.c b/hiredis.c
index ef89e4a..8d39692 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -585,7 +585,7 @@ void *redisReplyReaderGetObject(void *reader) {
void redisReplyReaderFree(void *reader) {
redisReader *r = reader;
- if (r->reply != NULL && r->fn)
+ if (r->reply != NULL && r->fn && r->fn->freeObject)
r->fn->freeObject(r->reply);
if (r->buf != NULL)
sdsfree(r->buf);