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
This commit is contained in:
Owen Anderson 2010-11-09 05:17:47 +00:00
parent 6a559cd695
commit a17cceceef

View File

@ -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;
}