Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kerikun11 committed Dec 19, 2018
1 parent 2bb21f0 commit 89aac0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp_utils/BLERemoteCharacteristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ BLERemoteCharacteristic::BLERemoteCharacteristic(
m_charProp = charProp;
m_pRemoteService = pRemoteService;
m_notifyCallback = nullptr;
m_rawData = nullptr;

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

Expand Down

0 comments on commit 89aac0a

Please sign in to comment.