Fix a memory leak in try_alloc_arena

This commit is contained in:
Michael Pavone committed 2016-08-12 09:29:08 -07:00
1 parent 600c9b845e
commit 919c0211fc
1 file changed
+3 -1
+3 -1
View File
@@ -83,5 +83,7 @@ void *try_alloc_arena()
if (!current_arena || !current_arena->free_count) {
return NULL;
}
return current_arena->free_blocks[--current_arena->free_count];
void *ret = current_arena->free_blocks[--current_arena->free_count];
track_block(ret);
return ret;
}