8000 fix #654 · DavideMorgado/esp32-snippets@89aac0a · GitHub
[go: up one dir, main page]

Skip to content

Commit 89aac0a

Browse files
committed
1 parent 2bb21f0 commit 89aac0a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp_utils/BLERemoteCharacteristic.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ BLERemoteCharacteristic::BLERemoteCharacteristic(
4444
m_charProp = charProp;
4545
m_pRemoteService = pRemoteService;
4646
m_notifyCallback = nullptr;
47+
m_rawData = nullptr;
4748

4849
retrieveDescriptors(); // Get the descriptors for this characteristic
4950
ESP_LOGD(LOG_TAG, "<< BLERemoteCharacteristic");
@@ -54,6 +55,7 @@ BLERemoteCharacteristic::BLERemoteCharacteristic(
5455
*@brief Destructor.
5556
*/
5657
BLERemoteCharacteristic::~BLERemoteCharacteristic() {
58+
if(m_rawData != nullptr) free(m_rawData);
5759
removeDescriptors(); // Release resources for any descriptor information we may have allocated.
5860
} // ~BLERemoteCharacteristic
5961

0 commit comments

Comments
 (0)
0