1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

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

llvm-svn: 118588
This commit is contained in:
Owen Anderson 2010-11-09 17:46:38 +00:00
parent 08310de036
commit 1fd660701c

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