Skip to content

Commit

Permalink
Fix memory leak.
Browse files Browse the repository at this point in the history
When redisLibuvAttach receives error from call to
uv_poll_init_socket there is a memory leaked ptr
of type redisLibuvEvents.
  • Loading branch information
AgranatMarkit authored and michael-grunder committed Jan 30, 2024
1 parent ff7a064 commit 2706c3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions adapters/libuv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2706c3e

Please sign in to comment.