diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2023-02-21 09:53:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 09:53:03 +0200 |
commit | bde40023ed79c9f6ee42dbd85ab92b2ba2e1fa70 (patch) | |
tree | df56666b50e9559e596d86e639bce59041ccc888 /web | |
parent | f1f6f4e197658c7f038966b6d6272366ca52ee80 (diff) |
Fix coverity issues (#14543)
* Fix coverity 383236: Resource leak
* Fix coverity 382915 : Logically dead code
* Fix coverity 379133 : Division or modulo by float zero
* Fix coverity 382783 : Copy into fixed size buffer
* Fix coverity 381151 : Missing unlock
* Fix coverity 381903 : Dereference after null check
Diffstat (limited to 'web')
-rw-r--r-- | web/api/queries/weights.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/web/api/queries/weights.c b/web/api/queries/weights.c index 73e8789cd9..0c85d33107 100644 --- a/web/api/queries/weights.c +++ b/web/api/queries/weights.c @@ -741,6 +741,8 @@ static size_t spread_results_evenly(DICTIONARY *results, WEIGHTS_STATS *stats) { } dfe_done(t); + if(!dimensions) return 0; // Coverity fix + // sort the array with the values of all dimensions qsort(slots, dimensions, sizeof(NETDATA_DOUBLE), compare_netdata_doubles); |