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:
ae920b6
)
Fix a memory leak of PragmaNamespaces, rdar://10611796.
author
Argyrios Kyrtzidis
<akyrtzi@gmail.com>
Fri, 6 Jan 2012 00:22:09 +0000
(
00:22
+0000)
committer
Argyrios Kyrtzidis
<akyrtzi@gmail.com>
Fri, 6 Jan 2012 00:22:09 +0000
(
00:22
+0000)
llvm-svn: 147635
clang/lib/Lex/Pragma.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Lex/Pragma.cpp
b/clang/lib/Lex/Pragma.cpp
index
cc612ff
..
1ccfe8c
100644
(file)
--- a/
clang/lib/Lex/Pragma.cpp
+++ b/
clang/lib/Lex/Pragma.cpp
@@
-714,8
+714,10
@@
void Preprocessor::RemovePragmaHandler(StringRef Namespace,
// If this is a non-default namespace and it is now empty, remove
// it.
- if (NS != PragmaHandlers && NS->IsEmpty())
+ if (NS != PragmaHandlers && NS->IsEmpty())
{
PragmaHandlers->RemovePragmaHandler(NS);
+ delete NS;
+ }
}
bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {