diff --git a/local.c b/local.c index 8fa9a087..d10d954b 100644 --- a/local.c +++ b/local.c @@ -418,6 +418,7 @@ static void accept_cb (EV_P_ ev_io *w, int revents) server->remote = remote; remote->server = server; connect(sockfd, res->ai_addr, res->ai_addrlen); + freeaddrinfo(res); // listen to remote connected event ev_io_start(EV_A_ &remote->send_ctx->io); break;