Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

Commit e2ab2a1

Browse files
authored
Merge pull request #1 from SeeedJP/dev-matsujirushi
Fix memory leak
2 parents 9fd17cb + 86f4f56 commit e2ab2a1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/WiFiClientSecure.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ WiFiClientSecure& WiFiClientSecure::operator=(const WiFiClientSecure& other) {
7979

8080
void WiFiClientSecure::stop() {
8181
if (sslclient->socket >= 0) {
82-
close(sslclient->socket);
82+
closesocket(sslclient->socket);
8383
sslclient->socket = -1;
8484
_connected = false;
8585
_peek = -1;

src/ssl_client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ void stop_ssl_socket(sslclient_context* ssl_client, const char* rootCABuff, cons
263263
log_v("Cleaning SSL connection.");
264264

265265
if (ssl_client->socket >= 0) {
266-
close(ssl_client->socket);
266+
closesocket(ssl_client->socket);
267267
ssl_client->socket = -1;
268268
}
269269

0 commit comments

Comments
 (0)