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:
parent
869f3d0ef1
commit
0084435a5f
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user