From ba77b00cc1f264e49f834a536d0f27aeee419050 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Fri, 25 May 2012 16:06:41 +0800 Subject: [PATCH] fix memory leak --- local.c | 1 + 1 file changed, 1 insertion(+) 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;