Return an error when encountering an invalid allocation info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35482 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ac653a30df
commit
386c8bad1b
@ -1542,6 +1542,7 @@ heap_get_allocation_info(heap_allocator *heap, void *address, size_t *size,
|
|||||||
panic("leak check info has invalid size %lu for element size %lu,"
|
panic("leak check info has invalid size %lu for element size %lu,"
|
||||||
" probably memory has been overwritten past allocation size\n",
|
" probably memory has been overwritten past allocation size\n",
|
||||||
info->size, bin->element_size);
|
info->size, bin->element_size);
|
||||||
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((addr_t)address != pageBase) {
|
if ((addr_t)address != pageBase) {
|
||||||
@ -1572,6 +1573,7 @@ heap_get_allocation_info(heap_allocator *heap, void *address, size_t *size,
|
|||||||
panic("leak check info has invalid size %lu for allocation of %lu,"
|
panic("leak check info has invalid size %lu for allocation of %lu,"
|
||||||
" probably memory has been overwritten past allocation size\n",
|
" probably memory has been overwritten past allocation size\n",
|
||||||
info->size, allocationSize);
|
info->size, allocationSize);
|
||||||
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user