malloc: set curr properly for destroy_heap

This commit is contained in:
Andrew Scott 2024-09-18 18:08:22 -04:00
parent e8f5fa88b5
commit 87dfec1942
Signed by: a
GPG key ID: 7CD5A5977E4931C1

View file

@ -228,6 +228,6 @@ void destroy_heap(struct gc_chunk *freelist)
while (curr->size != 0) {
struct gc_chunk *next = curr->next;
munmap(curr, curr->size);
curr = curr->next;
curr = next;
}
}