summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-11-09 05:17:47 +0000
committerOwen Anderson <resistor@mac.com>2010-11-09 05:17:47 +0000
commit25e84078e38ce3363bf3fd8342fea7e8bdfc0abd (patch)
treed6a33f472862461a2c72245cc1d683b7ce23f7ec /llvm/lib
parent1ac093b9eae40d5c0f47b426f11ecca8a98e9a80 (diff)
downloadbcm5719-llvm-25e84078e38ce3363bf3fd8342fea7e8bdfc0abd.tar.gz
bcm5719-llvm-25e84078e38ce3363bf3fd8342fea7e8bdfc0abd.zip
Fix leak in my recent fix for PR8442.
llvm-svn: 118490
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Attributes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Attributes.cpp b/llvm/lib/VMCore/Attributes.cpp
index d854628603b..c9240e534c7 100644
--- a/llvm/lib/VMCore/Attributes.cpp
+++ b/llvm/lib/VMCore/Attributes.cpp
@@ -132,7 +132,7 @@ public:
void DropRef() {
sys::SmartScopedLock<true> Lock(*ALMutex);
sys::cas_flag old = RefCount++;
- if (old == 0)
+ if (old == 1)
delete this;
}
OpenPOWER on IntegriCloud