diff options
author | SChernykh <sergey.v.chernykh@gmail.com> | 2021-03-18 21:57:13 +0100 |
---|---|---|
committer | SChernykh <sergey.v.chernykh@gmail.com> | 2021-03-18 21:57:13 +0100 |
commit | 9ca9f1214a1da15001736246dc1f00b22c930bdd (patch) | |
tree | 48b16b4eec7e631a566f71dd6b4ebe5231e9210e /contrib/epee | |
parent | Merge pull request #7390 (diff) | |
download | monero-9ca9f1214a1da15001736246dc1f00b22c930bdd.tar.xz |
Fixed issues found by static analysis
- rolling_median: tried to free uninitialized pointer in a constructor
- net_node.inl: erase-remove idiom was used incorrectly. remove_if doesn't actually remove elements, see http://cpp.sh/6fcjv
- bulletproofs.cc: call to sizeof() instead of vector.size(), luckily it only impacts performance and not code logic there
Diffstat (limited to 'contrib/epee')
-rw-r--r-- | contrib/epee/include/rolling_median.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/contrib/epee/include/rolling_median.h b/contrib/epee/include/rolling_median.h index 088a71d3e..877814e57 100644 --- a/contrib/epee/include/rolling_median.h +++ b/contrib/epee/include/rolling_median.h @@ -141,7 +141,6 @@ public: rolling_median_t(rolling_median_t &&m) { - free(data); memcpy(this, &m, sizeof(rolling_median_t)); m.data = NULL; } |