packet_allocator: catch expection when calling free()

If a client acknowledges the same packet more than once, the packet also
gets freed more than once. At the second attempt the underlaying
Bit_array will throw an 'Invalid_clear' exception, which results in an
uncaught exception that leads to an abort() call in the freeing
component.

Fixes #1462.
This commit is contained in:
Josef Söntgen 2015-03-16 13:07:49 +01:00 committed by Christian Helmuth
parent 381711dbea
commit e4f6fca355
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ class Genode::Packet_allocator : public Genode::Range_allocator
addr_t i = (((addr_t)addr) - _base) / _block_size;
size_t cnt = (size % _block_size) ? size / _block_size + 1
: size / _block_size;
_array->clear(i, cnt);
try { _array->clear(i, cnt); } catch(...) { }
_next = i;
}