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/Core/Memory.cpp | |
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/Core/Memory.cpp')
-rw-r--r-- | lib/Core/Memory.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Core/Memory.cpp b/lib/Core/Memory.cpp index 0d354bf3..584ea15d 100644 --- a/lib/Core/Memory.cpp +++ b/lib/Core/Memory.cpp @@ -155,9 +155,9 @@ ObjectState::ObjectState(const ObjectState &os) } ObjectState::~ObjectState() { - if (concreteMask) delete concreteMask; - if (flushMask) delete flushMask; - if (knownSymbolics) delete[] knownSymbolics; + delete concreteMask; + delete flushMask; + delete[] knownSymbolics; delete[] concreteStore; if (object) @@ -230,9 +230,9 @@ const UpdateList &ObjectState::getUpdates() const { } void ObjectState::makeConcrete() { - if (concreteMask) delete concreteMask; - if (flushMask) delete flushMask; - if (knownSymbolics) delete[] knownSymbolics; + delete concreteMask; + delete flushMask; + delete[] knownSymbolics; concreteMask = 0; flushMask = 0; knownSymbolics = 0; |