summaryrefslogtreecommitdiffstats
path: root/libnetdata
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2022-09-07 16:54:20 +0300
committerGitHub <noreply@github.com>2022-09-07 16:54:20 +0300
commitd36aa21fda18c5a12bc952abadade6b4495b8d3a (patch)
treec1e6d7f38fc3ec3b83c3ee210aac41bc98632fe8 /libnetdata
parentb8d1ae8de761c616f7e29e43677675c65c119996 (diff)
fix compile issues (#13640)
Diffstat (limited to 'libnetdata')
-rw-r--r--libnetdata/arrayalloc/arrayalloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libnetdata/arrayalloc/arrayalloc.c b/libnetdata/arrayalloc/arrayalloc.c
index bdf1384d49..c3e8114a83 100644
--- a/libnetdata/arrayalloc/arrayalloc.c
+++ b/libnetdata/arrayalloc/arrayalloc.c
@@ -218,6 +218,9 @@ ARAL *arrayalloc_create(size_t element_size, size_t elements, const char *filena
}
void *arrayalloc_mallocz(ARAL *ar) {
+ if(unlikely(!ar->internal.initialized))
+ arrayalloc_init(ar);
+
arrayalloc_lock(ar);
if(unlikely(!ar->internal.first_page || !ar->internal.first_page->free_list))