From 193283bc381ff7b798e7bf5dff7d0a11e55e0b40 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 16 Jun 2009 17:47:59 +0200 Subject: [PATCH] Fix memleak: freeaddrinfo() after Server resolve address. --- src/net.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/net.cc b/src/net.cc index 3efd357a9f..c4213667c1 100644 --- a/src/net.cc +++ b/src/net.cc @@ -717,6 +717,9 @@ Acceptor::Listen (const Arguments& args) address = AddressDefaultToIPv4(address_list); acceptor->Listen(address); + + if (address_list) freeaddrinfo(address_list); + return Undefined(); }