diff options
author | Andrea Mattavelli <andreamattavelli@gmail.com> | 2016-08-09 13:50:45 +0100 |
---|---|---|
committer | Andrea Mattavelli <andreamattavelli@gmail.com> | 2016-08-09 13:50:45 +0100 |
commit | e58d0412cbde4e0f1a4490e7ce4c5d480866bfbe (patch) | |
tree | 320d6692834cb62653e3fc610af680e5018f65b3 /lib/Core | |
parent | 171c119b48f67171b9cba1091bc58cb61edddd5b (diff) | |
download | klee-e58d0412cbde4e0f1a4490e7ce4c5d480866bfbe.tar.gz |
Fix to PTree pointer use-after-delete undefined behavior
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); } |