1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-05 19:33:47 +01:00
This commit is contained in:
J. Nick Koston
2025-06-16 15:04:40 +02:00
parent 545505691f
commit 0640ff13aa

View File

@@ -64,11 +64,8 @@ template<uint8_t SIZE> class BLEEventPool {
// Events are reused - the load methods handle cleanup // Events are reused - the load methods handle cleanup
// Just return to free list // Just return to free list
if (!this->free_list_.push(event)) { this->free_list_.push(event);
// This should not happen if pool size matches queue size // Push cannot fail: pool size = queue size, and we never exceed pool size
// But if it does, delete the event to prevent leak
delete event;
}
} }
// Get total number of events created (high water mark) // Get total number of events created (high water mark)