mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-13 18:56:30 +02:00
Memory leak (#1672)
When a package of size 0 arrives, "buf" is created, but never released. (Sorry, that was my mistake in the last patch)
This commit is contained in:
committed by
Me No Dev
parent
7761ebd9f2
commit
328523f5e3
@ -221,9 +221,10 @@ int WiFiUDP::parsePacket(){
|
||||
}
|
||||
remote_ip = IPAddress(si_other.sin_addr.s_addr);
|
||||
remote_port = ntohs(si_other.sin_port);
|
||||
if (len == 0) return 0;
|
||||
if (len > 0) {
|
||||
rx_buffer = new cbuf(len);
|
||||
rx_buffer->write(buf, len);
|
||||
}
|
||||
delete[] buf;
|
||||
return len;
|
||||
}
|
||||
|
Reference in New Issue
Block a user