Commit 7583ebb1 authored by michael-grunder's avatar michael-grunder Committed by Michael Grunder
Browse files

Make freeing a NULL redisAsyncContext a no op.

This makes our behavior consistent with redisFree and freeReplyObject.
parent 2c53dea7
......@@ -413,7 +413,11 @@ static void __redisAsyncFree(redisAsyncContext *ac) {
* free'ing. To do so, a flag is set on the context which is picked up by
* redisProcessCallbacks(). Otherwise, the context is immediately free'd. */
void redisAsyncFree(redisAsyncContext *ac) {
if (ac == NULL)
return;
redisContext *c = &(ac->c);
c->flags |= REDIS_FREEING;
if (!(c->flags & REDIS_IN_CALLBACK))
__redisAsyncFree(ac);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment