Skip to content

Commit e831680

Browse files
ushiboyushiboy
andauthored
Fixed a memory leak in BLE (issue espressif#4753) (espressif#4761)
* Fixed crash on delete after disconnect * Fixed memory leak when getting characteristics * Removed guard Co-authored-by: ushiboy <[email protected]>
1 parent d964873 commit e831680

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

‎libraries/BLE/src/BLEClient.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ BLEClient::~BLEClient(){
6060
delete myPair.second;
6161
}
6262
m_servicesMap.clear();
63+
m_servicesMapByInstID.clear();
6364
} // ~BLEClient
6465

6566

‎libraries/BLE/src/BLERemoteCharacteristic.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ BLERemoteCharacteristic::BLERemoteCharacteristic(
5252
*/
5353
BLERemoteCharacteristic::~BLERemoteCharacteristic(){
5454
removeDescriptors(); // Release resources for any descriptor information we may have allocated.
55+
free(m_rawData);
5556
} // ~BLERemoteCharacteristic
5657

5758

0 commit comments

Comments
(0)