Skip to content

Commit

Permalink
Possible DnsServer memory leak reported by coverity (#2870)
Browse files Browse the repository at this point in the history
  • Loading branch information
slaff authored Jul 24, 2024
1 parent d140eef commit 16cf83d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Sming/Components/Network/src/Network/DnsServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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)
Expand Down

0 comments on commit 16cf83d

Please sign in to comment.