diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
commit | 67c32a98315f785a9ec9d531c1f571a0196c7463 (patch) | |
tree | 4abb9cbeecc7901726dd0b4a37369596c852e9ef /lib/Support/Windows/RWMutex.inc | |
parent | 9f61947910e6ab40de38e6b4034751ef1513200f (diff) |
Diffstat (limited to 'lib/Support/Windows/RWMutex.inc')
-rw-r--r-- | lib/Support/Windows/RWMutex.inc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Support/Windows/RWMutex.inc b/lib/Support/Windows/RWMutex.inc index 00d0e93d8d586..2d1d25f67b8aa 100644 --- a/lib/Support/Windows/RWMutex.inc +++ b/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() { |