From 16cf83dc4178f3bb766332ff7b4e638f9491622e Mon Sep 17 00:00:00 2001 From: slaff Date: Wed, 24 Jul 2024 13:20:05 +0200 Subject: [PATCH] Possible DnsServer memory leak reported by coverity (#2870) --- Sming/Components/Network/src/Network/DnsServer.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Sming/Components/Network/src/Network/DnsServer.cpp b/Sming/Components/Network/src/Network/DnsServer.cpp index 5479e5e072..3e8c8e24ad 100644 --- a/Sming/Components/Network/src/Network/DnsServer.cpp +++ b/Sming/Components/Network/src/Network/DnsServer.cpp @@ -84,9 +84,6 @@ void DnsServer::onReceive(pbuf* buf, IpAddress remoteIP, uint16_t remotePort) } unsigned requestLen = pbuf_copy_partial(buf, buffer, buf->tot_len, 0); - if(requestLen != buf->tot_len) { - return; - } debug_hex(DBG, "< DNS", buffer, requestLen); @@ -97,8 +94,6 @@ void DnsServer::onReceive(pbuf* buf, IpAddress remoteIP, uint16_t remotePort) } delete[] buffer; - - UdpConnection::onReceive(buf, remoteIP, remotePort); } size_t DnsServer::processQuestion(char* buffer, size_t requestLen)