diff options
author | Vladimir Kobal <vlad@prokk.net> | 2022-04-01 15:22:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 15:22:49 +0200 |
commit | 7bfc543172115ee8c042f605c3af1432c43d1b07 (patch) | |
tree | ee0bce08b5526aae8dc13f737eddfe7696f26a61 /database/engine/journalfile.c | |
parent | 6ba6d670172ab4387ff722348f61c8268c410ed6 (diff) |
Fix memory leaks on Netdata exit (#12511)
* Fix memory leaks in dimensions and charts
* Initialize superblock memory regions
* Clean up static threads
* Fix memory leaks in compression
* Fix memory leaks in rrdcaltemplate
* Fix memory leaks in health config
* Fix ACLK memory leaks
Diffstat (limited to 'database/engine/journalfile.c')
-rw-r--r-- | database/engine/journalfile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/database/engine/journalfile.c b/database/engine/journalfile.c index ad5f7befc7..1541eb10aa 100644 --- a/database/engine/journalfile.c +++ b/database/engine/journalfile.c @@ -210,6 +210,7 @@ int create_journal_file(struct rrdengine_journalfile *journalfile, struct rrdeng if (unlikely(ret)) { fatal("posix_memalign:%s", strerror(ret)); } + memset(superblock, 0, sizeof(*superblock)); (void) strncpy(superblock->magic_number, RRDENG_JF_MAGIC, RRDENG_MAGIC_SZ); (void) strncpy(superblock->version, RRDENG_JF_VER, RRDENG_VER_SZ); |