plug leakage of mutex data. pthread_mutex_destroy() doesnt free our malloc'ed memory.
authorNuno Lopes <nunoplopes@sapo.pt>
Thu, 6 Nov 2008 16:21:49 +0000 (16:21 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Thu, 6 Nov 2008 16:21:49 +0000 (16:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58805 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Mutex.cpp

index f55dd3fe26fc6d0ea05334899be38e57445c0b19..d95c25b39eef8babfbbbb005ec2fbaeaeaef7aaf 100644 (file)
@@ -101,7 +101,7 @@ Mutex::~Mutex()
     pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
     assert(mutex != 0);
     pthread_mutex_destroy(mutex);
-    assert(mutex != 0);
+    free(mutex);
   }
 }