diff options
author | Mark Agranat <agranatmarkit@gmail.com> | 2023-11-14 23:53:25 +0100 |
---|---|---|
committer | Michael Grunder <michael.grunder@gmail.com> | 2024-01-30 10:42:32 -0800 |
commit | 2706c3e16d57c9babd24bfd83ade2efcdb13a7b8 (patch) | |
tree | 8e167964ff584e9ed5d3b5bbb6fd31c3197c05b1 | |
parent | ff7a064490e0aacf718a5263b25b2ddaad0d245e (diff) |
Fix memory leak.
When redisLibuvAttach receives error from call to
uv_poll_init_socket there is a memory leaked ptr
of type redisLibuvEvents.
-rw-r--r-- | adapters/libuv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/adapters/libuv.h b/adapters/libuv.h index 268edab..ec67c15 100644 --- a/adapters/libuv.h +++ b/adapters/libuv.h @@ -159,6 +159,7 @@ static int redisLibuvAttach(redisAsyncContext* ac, uv_loop_t* loop) { memset(p, 0, sizeof(*p)); if (uv_poll_init_socket(loop, &p->handle, c->fd) != 0) { + hi_free(p); return REDIS_ERR; } |