Really fix the leak in the attributes list. Thanks to Benjamin Kramer for pointing out how I was being stupid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118588 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2010-11-09 17:46:38 +00:00
parent d92354c574
commit d35b1a2f21

View File

@ -131,8 +131,8 @@ public:
}
void DropRef() {
sys::SmartScopedLock<true> Lock(*ALMutex);
sys::cas_flag old = RefCount++;
if (old == 1)
sys::cas_flag new_val = RefCount--;
if (new_val == 0)
delete this;
}