From 274c6a614577cb41d784149eb7fcf6cb2ed2398f Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Thu, 6 Nov 2008 16:21:49 +0000 Subject: [PATCH] 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 --- lib/System/Mutex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } }