Commit 070da216 authored by Charlie Somerville's avatar Charlie Somerville
Browse files

async.c: avoid a NULL deref when redisAsyncInitialize returns NULL

parent 81c95a5f
...@@ -174,6 +174,11 @@ redisAsyncContext *redisAsyncConnectUnix(const char *path) { ...@@ -174,6 +174,11 @@ redisAsyncContext *redisAsyncConnectUnix(const char *path) {
return NULL; return NULL;
ac = redisAsyncInitialize(c); ac = redisAsyncInitialize(c);
if (ac == NULL) {
redisFree(c);
return NULL;
}
__redisAsyncCopyError(ac); __redisAsyncCopyError(ac);
return ac; return 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