diff options
Diffstat (limited to 'sal/osl/w32/pipe.cxx')
-rw-r--r-- | sal/osl/w32/pipe.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sal/osl/w32/pipe.cxx b/sal/osl/w32/pipe.cxx index 3e71ef1d44d2..c94441e6362a 100644 --- a/sal/osl/w32/pipe.cxx +++ b/sal/osl/w32/pipe.cxx @@ -71,26 +71,26 @@ static oslPipe osl_createPipeImpl(void) static void osl_destroyPipeImpl(oslPipe pPipe) { - if (pPipe) - { - if (pPipe->m_NamedObject) - CloseHandle(pPipe->m_NamedObject); + if (!pPipe) + return; - if (pPipe->m_Security) - { - free(pPipe->m_Security->lpSecurityDescriptor); - free(pPipe->m_Security); - } + if (pPipe->m_NamedObject) + CloseHandle(pPipe->m_NamedObject); - CloseHandle(pPipe->m_ReadEvent); - CloseHandle(pPipe->m_WriteEvent); - CloseHandle(pPipe->m_AcceptEvent); + if (pPipe->m_Security) + { + free(pPipe->m_Security->lpSecurityDescriptor); + free(pPipe->m_Security); + } - if (pPipe->m_Name) - rtl_uString_release(pPipe->m_Name); + CloseHandle(pPipe->m_ReadEvent); + CloseHandle(pPipe->m_WriteEvent); + CloseHandle(pPipe->m_AcceptEvent); - free(pPipe); - } + if (pPipe->m_Name) + rtl_uString_release(pPipe->m_Name); + + free(pPipe); } oslPipe SAL_CALL osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options, |