Skip to content

Commit f2544dd

Browse files
aentingermattiabertorello
authored andcommitted
Setting value of _bearSslClient pointer to NULL after delete - good practice to prevent random memory access due to a dangling pointer
1 parent 0f0e6e0 commit f2544dd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ArduinoIoTCloud.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ArduinoIoTCloudClass::~ArduinoIoTCloudClass()
1919
{
2020
if (_bearSslClient) {
2121
delete _bearSslClient;
22+
_bearSslClient = NULL;
2223
}
2324
}
2425

0 commit comments

Comments
 (0)