diff options
Diffstat (limited to 'src/resolve/resolved-dns-cache.c')
-rw-r--r-- | src/resolve/resolved-dns-cache.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c index cf0e221621..03da73c4ae 100644 --- a/src/resolve/resolved-dns-cache.c +++ b/src/resolve/resolved-dns-cache.c @@ -80,17 +80,16 @@ static const char *dns_cache_item_type_to_string(DnsCacheItem *item) { return NULL; } -static void dns_cache_item_free(DnsCacheItem *i) { +static DnsCacheItem* dns_cache_item_free(DnsCacheItem *i) { if (!i) - return; + return NULL; dns_resource_record_unref(i->rr); dns_resource_key_unref(i->key); dns_answer_unref(i->answer); dns_packet_unref(i->full_packet); - free(i); + return mfree(i); } - DEFINE_TRIVIAL_CLEANUP_FUNC(DnsCacheItem*, dns_cache_item_free); static void dns_cache_item_unlink_and_free(DnsCache *c, DnsCacheItem *i) { |