[llvm-commits] [llvm] r118490 - /llvm/trunk/lib/VMCore/Attributes.cpp
Owen Anderson
resistor at mac.com
Mon Nov 8 21:17:47 PST 2010
Author: resistor
Date: Mon Nov 8 23:17:47 2010
New Revision: 118490
URL: http://llvm.org/viewvc/llvm-project?rev=118490&view=rev
Log:
Fix leak in my recent fix for PR8442.
Modified:
llvm/trunk/lib/VMCore/Attributes.cpp
Modified: llvm/trunk/lib/VMCore/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Attributes.cpp?rev=118490&r1=118489&r2=118490&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Attributes.cpp (original)
+++ llvm/trunk/lib/VMCore/Attributes.cpp Mon Nov 8 23:17:47 2010
@@ -132,7 +132,7 @@
void DropRef() {
sys::SmartScopedLock<true> Lock(*ALMutex);
sys::cas_flag old = RefCount++;
- if (old == 0)
+ if (old == 1)
delete this;
}
More information about the llvm-commits
mailing list