summaryrefslogtreecommitdiff
path: root/async.c
diff options
context:
space:
mode:
Diffstat (limited to 'async.c')
-rw-r--r--async.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/async.c b/async.c
index 29f6924..e37afbd 100644
--- a/async.c
+++ b/async.c
@@ -569,7 +569,9 @@ void redisProcessCallbacks(redisAsyncContext *ac) {
if (cb.fn != NULL) {
__redisRunCallback(ac,&cb,reply);
- c->reader->fn->freeObject(reply);
+ if (!(c->flags & REDIS_NO_AUTO_FREE_REPLIES)){
+ c->reader->fn->freeObject(reply);
+ }
/* Proceed with free'ing when redisAsyncFree() was called. */
if (c->flags & REDIS_FREEING) {