From: Nuno Lopes Date: Thu, 6 Nov 2008 16:21:49 +0000 (+0000) Subject: plug leakage of mutex data. pthread_mutex_destroy() doesnt free our malloc'ed memory. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=274c6a614577cb41d784149eb7fcf6cb2ed2398f;p=oota-llvm.git plug leakage of mutex data. pthread_mutex_destroy() doesnt free our malloc'ed memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58805 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/System/Mutex.cpp b/lib/System/Mutex.cpp index f55dd3fe26f..d95c25b39ee 100644 --- a/lib/System/Mutex.cpp +++ b/lib/System/Mutex.cpp @@ -101,7 +101,7 @@ Mutex::~Mutex() pthread_mutex_t* mutex = static_cast(data_); assert(mutex != 0); pthread_mutex_destroy(mutex); - assert(mutex != 0); + free(mutex); } }