coverity_350131: Fix sizeof on callocz (#7187)
The original plugin was allocating memory with wrong size, this commit fixes this
thiagoftsm committed
Oct 25, 2019 at 14:12 UTC
2119fdd11295d0d3bfc6ee855ca55bef3f771558
1 file changed
+1
-1
collectors/proc.plugin/proc_pagetypeinfo.c
+1
-1
@@ -222,7 +222,7 @@ int do_proc_pagetypeinfo(int update_every, usec_t dt) {
222
223
224
// Per-Numa Node & Zone & Type (full detail). Only if sum(line) > 0
225
- st_nodezonetype = callocz(pagelines_cnt, sizeof(RRDSET));
225
+ st_nodezonetype = callocz(pagelines_cnt, sizeof(RRDSET *));
226
for (p = 0; p < pagelines_cnt; p++) {
227
pgl = &pagelines[p];
228