mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 06:31:18 +00:00
PR21202: Memory leak in Windows RWMutexImpl when using SRWLOCK
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220251 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
33966cf988
commit
82805eb232
@ -84,12 +84,10 @@ RWMutexImpl::RWMutexImpl() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RWMutexImpl::~RWMutexImpl() {
|
RWMutexImpl::~RWMutexImpl() {
|
||||||
if (sHasSRW) {
|
if (!sHasSRW)
|
||||||
// Nothing to do in the case of slim reader/writers
|
|
||||||
} else {
|
|
||||||
DeleteCriticalSection(static_cast<LPCRITICAL_SECTION>(data_));
|
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() {
|
bool RWMutexImpl::reader_acquire() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user