Free BusNetwork _data on cleanup

This commit is contained in:
Troy
2024-11-10 13:34:30 -05:00
parent 6b2c4aec2f
commit 9223b3c6cd

View File

@@ -565,8 +565,8 @@ uint8_t BusNetwork::getPins(uint8_t* pinArray) const {
void BusNetwork::cleanup() {
_type = I_NONE;
_valid = false;
// if (_data != nullptr) free(_data);
// _data = nullptr;
if (_data != nullptr) free(_data);
_data = nullptr;
}
// ***************************************************************************