De-allocate memory used by timers on removal (#2936)

* De-alocate memory used by timers on removal

* CHANGELOG.md
This commit is contained in:
Björn Quentin 2025-01-13 09:28:19 +01:00 committed by GitHub
parent e13c09eb92
commit 7d7ce279d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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;
}
}