[Libreoffice-commits] core.git: sal/osl

Chris Sherlock chris.sherlock79 at gmail.com
Sat Jul 22 14:46:16 UTC 2017


 sal/osl/w32/pipe.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit aeb3853a21435f00f225d751e56184e875bc46ed
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat Jul 22 11:07:39 2017 +1000

    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 at gmail.com>
    Tested-by: Chris Sherlock <chris.sherlock79 at gmail.com>

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 */


More information about the Libreoffice-commits mailing list