projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d92354c
)
Really fix the leak in the attributes list. Thanks to Benjamin Kramer for pointing...
author
Owen Anderson
<resistor@mac.com>
Tue, 9 Nov 2010 17:46:38 +0000
(17:46 +0000)
committer
Owen Anderson
<resistor@mac.com>
Tue, 9 Nov 2010 17:46:38 +0000
(17:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118588
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Attributes.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Attributes.cpp
b/lib/VMCore/Attributes.cpp
index c9240e534c73842be24bc179574e52d6f1053140..37a217fc8c5a1a91f6fada3167b48d8178a32b93 100644
(file)
--- a/
lib/VMCore/Attributes.cpp
+++ b/
lib/VMCore/Attributes.cpp
@@
-131,8
+131,8
@@
public:
}
void DropRef() {
sys::SmartScopedLock<true> Lock(*ALMutex);
- sys::cas_flag
old = RefCount++
;
- if (
old == 1
)
+ sys::cas_flag
new_val = RefCount--
;
+ if (
new_val == 0
)
delete this;
}