mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-12-18 20:34:22 -05:00
add is_init check to h_mallinfo_arena_info
This commit is contained in:
parent
8974af86d1
commit
9fb2791af2
@ -1883,6 +1883,10 @@ EXPORT struct mallinfo h_mallinfo_arena_info(UNUSED size_t arena) {
|
|||||||
struct mallinfo info = {0};
|
struct mallinfo info = {0};
|
||||||
|
|
||||||
#if CONFIG_STATS
|
#if CONFIG_STATS
|
||||||
|
if (!is_init()) {
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
if (arena < N_ARENA) {
|
if (arena < N_ARENA) {
|
||||||
for (unsigned class = 0; class < N_SIZE_CLASSES; class++) {
|
for (unsigned class = 0; class < N_SIZE_CLASSES; class++) {
|
||||||
struct size_class *c = &ro.size_class_metadata[arena][class];
|
struct size_class *c = &ro.size_class_metadata[arena][class];
|
||||||
|
Loading…
Reference in New Issue
Block a user