[llvm-commits] [llvm] r58805 - /llvm/trunk/lib/System/Mutex.cpp
Nuno Lopes
nunoplopes at sapo.pt
Thu Nov 6 08:21:50 PST 2008
Author: nlopes
Date: Thu Nov 6 10:21:49 2008
New Revision: 58805
URL: http://llvm.org/viewvc/llvm-project?rev=58805&view=rev
Log:
plug leakage of mutex data. pthread_mutex_destroy() doesnt free our malloc'ed memory.
Modified:
llvm/trunk/lib/System/Mutex.cpp
Modified: llvm/trunk/lib/System/Mutex.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Mutex.cpp?rev=58805&r1=58804&r2=58805&view=diff
==============================================================================
--- llvm/trunk/lib/System/Mutex.cpp (original)
+++ llvm/trunk/lib/System/Mutex.cpp Thu Nov 6 10:21:49 2008
@@ -101,7 +101,7 @@
pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
assert(mutex != 0);
pthread_mutex_destroy(mutex);
- assert(mutex != 0);
+ free(mutex);
}
}
More information about the llvm-commits
mailing list