diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 8da289a253..b4eef9a731 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -3455,7 +3455,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, goto unlock; } newheader->ttl = 0; - newheader->type = rdataset->type; + newheader->type = topheader->type; newheader->attributes = RDATASET_ATTR_NONEXISTENT; newheader->trust = 0; newheader->serial = rbtversion->serial;