Fixed memory leak

pull/20/head
Tatsuhiro Tsujikawa 2012-05-16 23:28:07 +09:00
parent 0d507bba00
commit 0e5ae22f73
1 changed files with 5 additions and 0 deletions

View File

@ -42,6 +42,11 @@ void AsyncNameResolverTest::testParseAsyncDNSServers()
CPPUNIT_ASSERT(node);
CPPUNIT_ASSERT_EQUAL(AF_INET6, node->family);
CPPUNIT_ASSERT(memcmp(&ans6, &node->addr, sizeof(ans6)) == 0);
for(node = root; node;) {
ares_addr_node* nextNode = node->next;
delete node;
node = nextNode;
}
#endif // HAVE_ARES_ADDR_NODE
}