Fix arenas_cache_cleanup().

Fix arenas_cache_cleanup() to handle allocation/deallocation within the
application's thread-specific data cleanup functions even after
arenas_cache is torn down.
This commit is contained in:
Christopher Ferris
2015-08-21 12:23:06 -07:00
committed by Jason Evans
parent b5c2a347d7
commit 45e9f66c28
3 changed files with 15 additions and 2 deletions

View File

@@ -649,8 +649,12 @@ arenas_cache_cleanup(tsd_t *tsd)
arena_t **arenas_cache;
arenas_cache = tsd_arenas_cache_get(tsd);
if (arenas_cache != NULL)
if (arenas_cache != NULL) {
bool *arenas_cache_bypassp = tsd_arenas_cache_bypassp_get(tsd);
*arenas_cache_bypassp = true;
tsd_arenas_cache_set(tsd, NULL);
a0dalloc(arenas_cache);
}
}
void