In most of the other call, we called similar functions that remove the
data structure link-ups to other objects "unlink", hence we should here,
too.
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsCacheItem*, dns_cache_item_free);
-static void dns_cache_item_remove_and_free(DnsCache *c, DnsCacheItem *i) {
+static void dns_cache_item_unlink_and_free(DnsCache *c, DnsCacheItem *i) {
DnsCacheItem *first;
assert(c);
if (r < 0)
return r;
if (r > 0) {
- dns_cache_item_remove_and_free(c, i);
+ dns_cache_item_unlink_and_free(c, i);
return true;
}
}
* either remove only this one RR or the whole
* RRset */
if (i->shared_owner)
- dns_cache_item_remove_and_free(c, i);
+ dns_cache_item_unlink_and_free(c, i);
else {
_cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;