@cryptotaxi247 / netdata-1 / commits / f7b328395

Fix memory allocation when computing standard deviation (#10484)

Stelios Fragkakis committed Jan 13, 2021 at 12:53 UTC f7b32839562143d5cc70d6bd01be3b514d2b2495
1 file changed +2 -4
web/api/queries/stddev/stddev.c
+2 -4
@@ -15,10 +15,8 @@ struct grouping_stddev {
15 };
16
17 void *grouping_create_stddev(RRDR *r) {
18 - long entries = r->group;
19 - if(entries < 0) entries = 0;
20 -
21 - return callocz(1, sizeof(struct grouping_stddev) + entries * sizeof(LONG_DOUBLE));
18 + UNUSED (r);
19 + return callocz(1, sizeof(struct grouping_stddev));
20 }
21
22 // resets when switches dimensions