summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dns.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index ced8b637f..aa340a1de 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -1068,20 +1068,13 @@ bool DNS::AddResolverClass(Resolver* r)
Classes[r->GetId()] = r;
return true;
}
- else
- /* Duplicate id */
- return false;
}
- else
- {
- /* Pointer or id not valid.
- * Free the item and return
- */
- if (r)
- delete r;
- return false;
- }
+ /* Pointer or id not valid, or duplicate id.
+ * Free the item and return
+ */
+ delete r;
+ return false;
}
void DNS::CleanResolvers(Module* module)