mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-29 05:10:55 +00:00
De-allocate memory used by timers on removal (#2936)
* De-alocate memory used by timers on removal * CHANGELOG.md
This commit is contained in:
parent
e13c09eb92
commit
7d7ce279d1
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Fixed triggering a debug-assertion during scan (#2612)
|
||||
- Fix WPA2-ENTERPRISE functionality (#2896)
|
||||
- Make sure to de-allocate memory used by timers on removal (#2936)
|
||||
|
||||
### Removed
|
||||
|
||||
|
@ -112,6 +112,11 @@ impl TimerQueue {
|
||||
};
|
||||
|
||||
if let Some(before) = before {
|
||||
let to_remove = before.next.take().unwrap();
|
||||
let to_remove = Box::into_raw(to_remove);
|
||||
unsafe {
|
||||
crate::compat::malloc::free(to_remove as *mut _);
|
||||
}
|
||||
before.next = tail;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user