fixed leak in maps freelist
@@ -66,6 +66,7 @@ static void hl_freelist_add_range( hl_free_list *f, int pos, int count ) {
return;
} else if( pos + count == f->head ) {
f->head -= count;
+ f->nbuckets += count;
return;
} else {
int cur_pos = f->head, cur_count = f->nbuckets;
@@ -83,6 +84,7 @@ static void hl_freelist_add_range( hl_free_list *f, int pos, int count ) {
}
if( b < f->buckets + f->head && b->pos == pos + count ) {
b->pos -= count;
+ b->count += count;
// merge
if( prev && prev->pos + prev->count == b->pos ) {
prev->count += b->count;
