Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b2c6788

Browse filesBrowse files
authored
std::shared_ptr Memory Leak (espressif#3680)
* std::shared_ptr Memory Leak clientSocketHande and _rxBuffer are std::shared_ptr, the stop() call was not correctly releasing them and the operator= had similar problems fix for espressif#3679 * operator= second attempt * operator= third time
1 parent ed220bd commit b2c6788
Copy full SHA for b2c6788

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎libraries/WiFi/src/WiFiClient.cpp

Copy file name to clipboardExpand all lines: libraries/WiFi/src/WiFiClient.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ WiFiClient & WiFiClient::operator=(const WiFiClient &other)
196196

197197
void WiFiClient::stop()
198198
{
199-
clientSocketHandle = NULL;
200-
_rxBuffer = NULL;
199+
clientSocketHandle.reset(); // clientSocketHandle = NULL;
200+
_rxBuffer.reset(); // _rxBuffer = NULL;
201201
_connected = false;
202202
}
203203

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.