sal/osl/unx/pipe.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit f0b87b18c3c35b6549946337697108a6113bd940
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun Jul 13 16:10:45 2025 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Mon Jul 14 15:47:42 2025 +0200

    cid#1659044 Resource leak
    
    Change-Id: I6653e0cacb45239638fe086c9767493cf29aa3d1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187805
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx
index daeb0e65572c..3e1df1e23a87 100644
--- a/sal/osl/unx/pipe.cxx
+++ b/sal/osl/unx/pipe.cxx
@@ -208,7 +208,10 @@ static oslPipe osl_psz_createPipe(const char *pszPipeName, 
oslPipeOptions Option
     SAL_INFO("sal.osl.pipe", "new pipe on fd " << pPipe->m_Socket << " '" << 
name << "'");
 
     if (isForbidden(name, osl_File_OpenFlag_Create))
+    {
+        destroyPipeImpl(pPipe);
         return nullptr;
+    }
 
     addr.sun_family = AF_UNIX;
     // coverity[fixed_size_dest : FALSE] - safe, see check above

Reply via email to