aboutsummaryrefslogtreecommitdiff
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
commita17cceceef8c8ce441c329f2795b8f713c23e8e6 (patch)
tree490e0f220df1c79893659adf09fff60d887bb55f
parent6a559cd6959bef28d20acef2129e5510bcc12bb8 (diff)
Fix leak in my recent fix for PR8442.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118490 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Attributes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index d854628603..c9240e534c 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/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;
}