From ccb1837a1481ed3d9048f2e4d0d5d6309f14d17d Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 14 Jul 2006 11:43:17 +0000 Subject: Fix dns socket leak found in stable git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4383 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/dns.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/dns.cpp') diff --git a/src/dns.cpp b/src/dns.cpp index e8b15c9bf..e3a32a745 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -702,6 +702,11 @@ void DNS::SetNS(const std::string &dnsserver) DNS::~DNS() { + if (this->myfd > -1) + { + log(DEBUG,"HA! An FD tried to sneak by unnoticed - freed it."); + dns_close(this->myfd); + } } bool DNS::ReverseLookup(const std::string &ip, bool ins) -- cgit v1.2.3