From 26588f50074baf2b953468cd37405444bd4db179 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Thu, 21 Apr 2011 10:54:15 +0200 Subject: [PATCH] Test if there is a freeObject function --- hiredis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);