We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c595cc0 commit 906bab9Copy full SHA for 906bab9
libraries/lwIpWrapper/src/lwipClient.cpp
@@ -363,9 +363,12 @@ void lwipClient::stop() {
363
364
// reset all the other variables in this class
365
366
- // if(tcp->p != nullptr) {
367
- // pbuf_free(tcp->p); // FIXME it happens that a pbuf, with ref == 0 is added for some reason
368
- // }
+ if(this->tcp_info->pbuf_head != nullptr) {
+ pbuf_free(this->tcp_info->pbuf_head); // FIXME it happens that a pbuf, with ref == 0 is added for some reason
+ this->tcp_info->pbuf_head = nullptr;
369
+ }
370
+ this->tcp_info->pbuf_offset = 0;
371
+
372
if(this->tcp_info->server != nullptr) {
373
// need to first make the server point to nullptr, then remove the client, can cause infinite recursion
374
auto server = this->tcp_info->server;
0 commit comments