projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74dd854
)
PR21202: Memory leak in Windows RWMutexImpl when using SRWLOCK
author
David Blaikie
<dblaikie@gmail.com>
Tue, 21 Oct 2014 00:34:39 +0000
(
00:34
+0000)
committer
David Blaikie
<dblaikie@gmail.com>
Tue, 21 Oct 2014 00:34:39 +0000
(
00:34
+0000)
llvm-svn: 220251
llvm/lib/Support/Windows/RWMutex.inc
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/Windows/RWMutex.inc
b/llvm/lib/Support/Windows/RWMutex.inc
index
00d0e93
..
2d1d25f
100644
(file)
--- a/
llvm/lib/Support/Windows/RWMutex.inc
+++ b/
llvm/lib/Support/Windows/RWMutex.inc
@@
-84,12
+84,10
@@
RWMutexImpl::RWMutexImpl() {
}
RWMutexImpl::~RWMutexImpl() {
- if (sHasSRW) {
- // Nothing to do in the case of slim reader/writers
- } else {
+ if (!sHasSRW)
DeleteCriticalSection(static_cast<LPCRITICAL_SECTION>(data_));
- free(data_);
- }
+ // Nothing to do in the case of slim reader/writers except free the memory.
+ free(data_);
}
bool RWMutexImpl::reader_acquire() {