aboutsummaryrefslogtreecommitdiff
path: root/lib/System/Mutex.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-11-06 16:21:49 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-11-06 16:21:49 +0000
commit274c6a614577cb41d784149eb7fcf6cb2ed2398f (patch)
tree53ee05902168a367d950ae7c6affc3d2b36029d5 /lib/System/Mutex.cpp
parentb951aec3adf4ac34aa311c912ed8a7f6b437eaa5 (diff)
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
Diffstat (limited to 'lib/System/Mutex.cpp')
-rw-r--r--lib/System/Mutex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/System/Mutex.cpp b/lib/System/Mutex.cpp
index f55dd3fe26..d95c25b39e 100644
--- a/lib/System/Mutex.cpp
+++ b/lib/System/Mutex.cpp
@@ -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);
}
}