Commit 8b498b9f authored by Wayne Davison's avatar Wayne Davison

Decided against the last change.

parent c04af697
......@@ -226,15 +226,9 @@ pool_free_old(alloc_pool_t p, void *addr)
struct alloc_pool *pool = (struct alloc_pool *)p;
struct pool_extent *cur, *prev, *next;
if (!pool)
if (!pool || !addr)
return;
if (!addr) {
if (!pool->extents)
return;
addr = PTR_ADD(pool->extents->start, pool->extents->free);
}
for (prev = NULL, cur = pool->extents; cur; prev = cur, cur = cur->next) {
if (addr >= cur->start
&& addr < PTR_ADD(cur->start, pool->size))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment