diff --git a/subsys/net/lib/dns/mdns_responder.c b/subsys/net/lib/dns/mdns_responder.c index 568899cc588..043878a4fe4 100644 --- a/subsys/net/lib/dns/mdns_responder.c +++ b/subsys/net/lib/dns/mdns_responder.c @@ -659,8 +659,6 @@ static int dispatcher_cb(void *my_ctx, int sock, NET_DBG("%s read failed (%d)", "mDNS", ret); } - net_buf_unref(dns_data); - return ret; } diff --git a/subsys/net/lib/dns/resolve.c b/subsys/net/lib/dns/resolve.c index ec25773b9f0..f8d7a2cb1a8 100644 --- a/subsys/net/lib/dns/resolve.c +++ b/subsys/net/lib/dns/resolve.c @@ -275,10 +275,6 @@ quit: release_query(&ctx->queries[i]); free_buf: - if (dns_data) { - net_buf_unref(dns_data); - } - if (dns_cname) { net_buf_unref(dns_cname); }