Skip to content
Snippets Groups Projects
Commit 58749569 authored by Avi Kivity's avatar Avi Kivity
Browse files

mempool: fix corruption when freeing a pool page

We kept pool::_free pointing at a freed object.  Naturally things did not
work well.

Fix by nulling the pointer for now, however this leaks the rest of the free
list.
parent 0bedccee
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,7 @@ void pool::free(void* object)
if (!--header->nalloc) {
// FIXME: add hysteresis
free_page(header);
_free = nullptr;
} else {
obj->next = _free;
_free = obj;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment