add missing check for new_addr chunk size
8ddc93293c
switched this to over using the
address tree in order to avoid false negatives, so it now needs to check
that the size of the free extent is large enough to satisfy the request.
This commit is contained in:
parent
cbf3a6d703
commit
1eaf3b6f34
@ -82,7 +82,7 @@ chunk_recycle(arena_t *arena, extent_tree_t *chunks_szad,
|
||||
malloc_mutex_lock(&arena->chunks_mtx);
|
||||
node = (new_addr != NULL) ? extent_tree_ad_search(chunks_ad, &key) :
|
||||
extent_tree_szad_nsearch(chunks_szad, &key);
|
||||
if (node == NULL) {
|
||||
if (node == NULL || (new_addr != NULL && node->size < size)) {
|
||||
malloc_mutex_unlock(&arena->chunks_mtx);
|
||||
return (NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user