aboutsummaryrefslogtreecommitdiff
path: root/src/common/dns_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/dns_utils.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp
index ab38cbbae..979f34b3e 100644
--- a/src/common/dns_utils.cpp
+++ b/src/common/dns_utils.cpp
@@ -307,12 +307,8 @@ DNSResolver& DNSResolver::instance()
{
boost::lock_guard<boost::mutex> lock(instance_lock);
- static DNSResolver* staticInstance = NULL;
- if (staticInstance == NULL)
- {
- staticInstance = new DNSResolver();
- }
- return *staticInstance;
+ static DNSResolver staticInstance;
+ return staticInstance;
}
DNSResolver DNSResolver::create()