diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 9e9f0be581be..92d010b0d786 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1741,7 +1741,7 @@ static int deleteRRSet(const std::string& zone_, const std::string& name_, const DNSName name; if (name_ == "@") { name = zone; - } else if (isCanonical(name_) || boost::ends_with(name_, zone)) { + } else if (isCanonical(name_) || boost::ends_with(name_, zone_)) { name = DNSName(name_); } else { cerr << "Name " << name_ << "' does not fit into zone '" << zone << "'. Interpreting as relative name." << endl;