summaryrefslogtreecommitdiff
path: root/sal/osl/w32
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-07-22 11:07:39 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-07-22 16:45:36 +0200
commitaeb3853a21435f00f225d751e56184e875bc46ed (patch)
tree20b646e1c9b07595e13c3dfff9dfe4b54abc2c31 /sal/osl/w32
parent7dc86ea81ae26b972c52448ee367c9ea5d8d92b4 (diff)
osl: (Win32) check allocated pipe succeeded, otherwise needs to fail
Change-Id: I0e508de4215d92700a9134e422a7b9370f387aea Reviewed-on: https://gerrit.libreoffice.org/40300 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'sal/osl/w32')
-rw-r--r--sal/osl/w32/pipe.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sal/osl/w32/pipe.cxx b/sal/osl/w32/pipe.cxx
index f0ecf53f4b59..29bfcb77e756 100644
--- a/sal/osl/w32/pipe.cxx
+++ b/sal/osl/w32/pipe.cxx
@@ -151,6 +151,11 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options
/* alloc memory */
pPipe = osl_createPipeImpl();
+
+ assert(pPipe); // if osl_createPipeImpl() cannot init. a new pipe, this is a failure
+ if (!pPipe)
+ return nullptr;
+
osl_atomic_increment(&(pPipe->m_Reference));
/* build system pipe name */