diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2022-07-19 13:06:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 13:06:49 +0300 |
commit | e9507d3f4e2e58ddd5ce7c08a17c1de116c9f50e (patch) | |
tree | ae4a797ac8c0ee6c8b942f5333f3a9b5d69142f2 /libnetdata | |
parent | 07656f97597120eaf321b6718ae21f815ce246c5 (diff) |
Fix coverity issue 379240 (Unchecked return value) (#13401)
Diffstat (limited to 'libnetdata')
-rw-r--r-- | libnetdata/arrayalloc/arrayalloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libnetdata/arrayalloc/arrayalloc.c b/libnetdata/arrayalloc/arrayalloc.c index 82bfa42950..bdf1384d49 100644 --- a/libnetdata/arrayalloc/arrayalloc.c +++ b/libnetdata/arrayalloc/arrayalloc.c @@ -317,7 +317,8 @@ void arrayalloc_freez(ARAL *ar, void *ptr) { // free it if(ar->internal.mmap) { munmap(page->data, page->size); - unlink(page->filename); + if (unlikely(unlink(page->filename) == 1)) + error("Cannot delete file '%s'", page->filename); freez((void *)page->filename); } else |