From a17cceceef8c8ce441c329f2795b8f713c23e8e6 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 9 Nov 2010 05:17:47 +0000 Subject: [PATCH] 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 --- lib/VMCore/Attributes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1