Commit 2706c3e1 authored by Mark Agranat's avatar Mark Agranat Committed by Michael Grunder
Browse files

Fix memory leak.

When redisLibuvAttach receives error from call to
uv_poll_init_socket there is a memory leaked ptr
of type redisLibuvEvents.
parent ff7a0644
...@@ -159,6 +159,7 @@ static int redisLibuvAttach(redisAsyncContext* ac, uv_loop_t* loop) { ...@@ -159,6 +159,7 @@ static int redisLibuvAttach(redisAsyncContext* ac, uv_loop_t* loop) {
memset(p, 0, sizeof(*p)); memset(p, 0, sizeof(*p));
if (uv_poll_init_socket(loop, &p->handle, c->fd) != 0) { if (uv_poll_init_socket(loop, &p->handle, c->fd) != 0) {
hi_free(p);
return REDIS_ERR; return REDIS_ERR;
} }
......
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