summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit2817338558506b364701bf65ff8137b013b3a31c (patch)
treeaa25ee73b8c1ecec7fd02e69d26ba6f2015e4733 /llvm/lib/System/Mutex.cpp
parentb426f6330235c819306d2856ba6904d85c49f675 (diff)
downloadbcm5719-llvm-2817338558506b364701bf65ff8137b013b3a31c.tar.gz
bcm5719-llvm-2817338558506b364701bf65ff8137b013b3a31c.zip
plug leakage of mutex data. pthread_mutex_destroy() doesnt free our malloc'ed memory.
llvm-svn: 58805
Diffstat (limited to 'llvm/lib/System/Mutex.cpp')
-rw-r--r--llvm/lib/System/Mutex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/System/Mutex.cpp b/llvm/lib/System/Mutex.cpp
index f55dd3fe26f..d95c25b39ee 100644
--- a/llvm/lib/System/Mutex.cpp
+++ b/llvm/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);
}
}
OpenPOWER on IntegriCloud