projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ee6b7f
)
[AST] Plug a memory leak when promoting a single ParentMap entry to a vector.
author
Benjamin Kramer
<benny.kra@googlemail.com>
Fri, 23 Oct 2015 13:24:18 +0000
(13:24 +0000)
committer
Benjamin Kramer
<benny.kra@googlemail.com>
Fri, 23 Oct 2015 13:24:18 +0000
(13:24 +0000)
Found by asan!
llvm-svn: 251110
clang/lib/AST/ASTContext.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/AST/ASTContext.cpp
b/clang/lib/AST/ASTContext.cpp
index
90f9dbb
..
dabc6f6
100644
(file)
--- a/
clang/lib/AST/ASTContext.cpp
+++ b/
clang/lib/AST/ASTContext.cpp
@@
-8774,11
+8774,11
@@
createDynTypedNode(const NestedNameSpecifierLoc &Node) {
if (!NodeOrVector.template is<ASTContext::ParentVector *>()) {
auto *Vector = new ASTContext::ParentVector(
1, getSingleDynTypedNodeFromParentMap(NodeOrVector));
- NodeOrVector = Vector;
if (auto *Node =
NodeOrVector
.template dyn_cast<ast_type_traits::DynTypedNode *>())
delete Node;
+ NodeOrVector = Vector;
}
auto *Vector =