base: don't free initial slab in destructor

Issue #2505
This commit is contained in:
Alexander Boettcher 2017-08-22 18:28:08 +02:00 committed by Christian Helmuth
parent 08a311b033
commit a63eb3cc37
1 changed files with 5 additions and 1 deletions

View File

@ -243,8 +243,12 @@ Slab::~Slab()
return;
/* free backing store */
while (_num_blocks > 1)
while (_num_blocks > 1) {
/* never free the initial block */
if (_curr_sb == _initial_sb)
_curr_sb = _curr_sb->next;
_free_curr_sb();
}
/* release last block */
_release_backing_store(_curr_sb);