From: Aki Tuomi Date: Tue, 29 Sep 2015 17:31:47 +0000 (+0300) Subject: Close d_sock when DNSProxy goes away X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~12^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=732d9faaa6cfa3c3aece32b2dc7c535d43251338;p=thirdparty%2Fpdns.git Close d_sock when DNSProxy goes away fix cid#1029928 --- diff --git a/pdns/dnsproxy.cc b/pdns/dnsproxy.cc index d889e98891..4d8858d441 100644 --- a/pdns/dnsproxy.cc +++ b/pdns/dnsproxy.cc @@ -301,3 +301,8 @@ void DNSProxy::mainloop(void) L<-1) closesocket(d_sock); + d_sock=-1; +} diff --git a/pdns/dnsproxy.hh b/pdns/dnsproxy.hh index c48dec7128..b842c5dce4 100644 --- a/pdns/dnsproxy.hh +++ b/pdns/dnsproxy.hh @@ -52,6 +52,7 @@ class DNSProxy { public: DNSProxy(const string &ip); //!< creates socket + ~DNSProxy(); //