diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2021-01-13 12:53:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 12:53:40 +0200 |
commit | f7b32839562143d5cc70d6bd01be3b514d2b2495 (patch) | |
tree | 6b81251725afba06b4e98f7d54d5be8e1af29ffc /web/api/queries/stddev/stddev.c | |
parent | bbc4da1341499c7aba66c4a9f1076e42c8e58c51 (diff) |
Fix memory allocation when computing standard deviation (#10484)
Diffstat (limited to 'web/api/queries/stddev/stddev.c')
-rw-r--r-- | web/api/queries/stddev/stddev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/web/api/queries/stddev/stddev.c b/web/api/queries/stddev/stddev.c index ad0efc838e..16258445c3 100644 --- a/web/api/queries/stddev/stddev.c +++ b/web/api/queries/stddev/stddev.c @@ -15,10 +15,8 @@ struct grouping_stddev { }; void *grouping_create_stddev(RRDR *r) { - long entries = r->group; - if(entries < 0) entries = 0; - - return callocz(1, sizeof(struct grouping_stddev) + entries * sizeof(LONG_DOUBLE)); + UNUSED (r); + return callocz(1, sizeof(struct grouping_stddev)); } // resets when switches dimensions |