projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b951aec
)
plug leakage of mutex data. pthread_mutex_destroy() doesnt free our malloc'ed memory.
author
Nuno Lopes
<nunoplopes@sapo.pt>
Thu, 6 Nov 2008 16:21:49 +0000
(16:21 +0000)
committer
Nuno Lopes
<nunoplopes@sapo.pt>
Thu, 6 Nov 2008 16:21:49 +0000
(16:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58805
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/System/Mutex.cpp
patch
|
blob
|
history
diff --git
a/lib/System/Mutex.cpp
b/lib/System/Mutex.cpp
index f55dd3fe26fc6d0ea05334899be38e57445c0b19..d95c25b39eef8babfbbbb005ec2fbaeaeaef7aaf 100644
(file)
--- 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);
pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
assert(mutex != 0);
pthread_mutex_destroy(mutex);
-
assert(mutex != 0
);
+
free(mutex
);
}
}
}
}