Fix memory leak.

When redisLibuvAttach receives error from call to
uv_poll_init_socket there is a memory leaked ptr
of type redisLibuvEvents.
This commit is contained in:
Mark Agranat 2023-11-14 23:53:25 +01:00 committed by Michael Grunder
parent ff7a064490
commit 2706c3e16d

View File

@ -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;
}