Skip to content

Commit b2c6788

Browse 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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/WiFi/src/WiFiClient.cpp

+2-2
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)