diff options
author | Oscar Deits <odeits@vidder.com> | 2017-08-27 23:19:29 -0400 |
---|---|---|
committer | Oscar Deits <odeits@vidder.com> | 2017-08-27 23:19:29 -0400 |
commit | b5929722363993bf0ad2a56d66176606cc742bc4 (patch) | |
tree | b6dce38dd98d681e97d08d0b42adff078ccf7215 /lib/Basic | |
parent | d19500eb93083c8cc6bb72bcb54414015830cacb (diff) | |
download | klee-b5929722363993bf0ad2a56d66176606cc742bc4.tar.gz |
Remove unnecessary null pointer checks
Fixes klee/klee#717 delete on null pointer is always safe.
Diffstat (limited to 'lib/Basic')
-rw-r--r-- | lib/Basic/Statistics.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Basic/Statistics.cpp b/lib/Basic/Statistics.cpp index 9c95a891..402b0e5a 100644 --- a/lib/Basic/Statistics.cpp +++ b/lib/Basic/Statistics.cpp @@ -22,18 +22,18 @@ StatisticManager::StatisticManager() } StatisticManager::~StatisticManager() { - if (globalStats) delete[] globalStats; - if (indexedStats) delete[] indexedStats; + delete[] globalStats; + delete[] indexedStats; } void StatisticManager::useIndexedStats(unsigned totalIndices) { - if (indexedStats) delete[] indexedStats; + delete[] indexedStats; indexedStats = new uint64_t[totalIndices * stats.size()]; memset(indexedStats, 0, sizeof(*indexedStats) * totalIndices * stats.size()); } void StatisticManager::registerStatistic(Statistic &s) { - if (globalStats) delete[] globalStats; + delete[] globalStats; s.id = stats.size(); stats.push_back(&s); globalStats = new uint64_t[stats.size()]; |