fix null check (accidentally inverted conditional)

This commit is contained in:
Brendan Hansknecht 2024-09-17 14:20:36 -07:00
parent 3e423ce418
commit 7989ee763c
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -170,7 +170,7 @@ impl<T> Heap<T> {
}
pub fn alloc(&mut self) -> Result<*mut T> {
if self.free_list.is_null() {
if !self.free_list.is_null() {
// Open slot on the free list.
let root = self.free_list as *const *const c_void;
let next = unsafe { *root };