Fix problem of not de-allocating memory in some situations (#3949)

* Fix problem of not de-allocating memory in some situations

* CHANGELOG.md
This commit is contained in:
Björn Quentin 2025-08-18 11:53:58 +02:00 committed by GitHub
parent ef496a44da
commit c1c2d04124
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fix problem of not de-allocating memory in some situations (#3949)
### Removed

View File

@ -30,7 +30,7 @@ unsafe impl Allocator for EspHeap {
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) {
unsafe {
crate::HEAP.dealloc(ptr.as_ptr(), layout);
self.dealloc(ptr.as_ptr(), layout);
}
}
}
@ -45,7 +45,7 @@ unsafe impl CoreAllocator for EspHeap {
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) {
unsafe {
crate::HEAP.dealloc(ptr.as_ptr(), layout);
self.dealloc(ptr.as_ptr(), layout);
}
}
}