diff options
author | MartinNowack <martin.nowack@gmail.com> | 2016-08-10 10:01:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-10 10:01:12 +0200 |
commit | 66b3470f4d01df50bc77d9f96e3c526e8e4cbf91 (patch) | |
tree | 7156a084d6f60d13c1f48ca44f6c332e85af615e /lib/Core | |
parent | 74d88a5e0d6020fc262c166e42b8acdc335b4999 (diff) | |
parent | e58d0412cbde4e0f1a4490e7ce4c5d480866bfbe (diff) | |
download | klee-66b3470f4d01df50bc77d9f96e3c526e8e4cbf91.tar.gz |
Merge pull request #451 from andreamattavelli/fix_ub_ptree
Fix to PTree pointer use-after-delete
Diffstat (limited to 'lib/Core')
-rw-r--r-- | lib/Core/PTree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Core/PTree.cpp b/lib/Core/PTree.cpp index f0e7ab51..77698bb5 100644 --- a/lib/Core/PTree.cpp +++ b/lib/Core/PTree.cpp @@ -37,7 +37,6 @@ void PTree::remove(Node *n) { assert(!n->left && !n->right); do { Node *p = n->parent; - delete n; if (p) { if (n == p->left) { p->left = 0; @@ -46,6 +45,7 @@ void PTree::remove(Node *n) { p->right = 0; } } + delete n; n = p; } while (n && !n->left && !n->right); } |