From: Owen Anderson Date: Tue, 9 Nov 2010 05:17:47 +0000 (+0000) Subject: Fix leak in my recent fix for PR8442. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a17cceceef8c8ce441c329f2795b8f713c23e8e6;p=oota-llvm.git 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 --- diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp index d854628603b..c9240e534c7 100644 --- a/lib/VMCore/Attributes.cpp +++ b/lib/VMCore/Attributes.cpp @@ -132,7 +132,7 @@ public: void DropRef() { sys::SmartScopedLock Lock(*ALMutex); sys::cas_flag old = RefCount++; - if (old == 0) + if (old == 1) delete this; }