[Libreoffice-commits] core.git: filter/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Mon May 18 18:24:49 UTC 2020


 filter/source/graphicfilter/ieps/ieps.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 835bced249e95ccbf0a88266f8c1ba166cf5efcb
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Mon May 18 13:41:31 2020 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Mon May 18 20:24:16 2020 +0200

    fix potential leak in runProcessWithPathSearch (filter/ieps)
    
    Change-Id: Ifa1d3c7aba95aa0800d6d0481d0258367ac1317a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94417
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 1aaed97295b6..413e6725fc73 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -151,7 +151,7 @@ static oslProcessError runProcessWithPathSearch(const OUString &rProgName,
     rtl_uString* pArgs[], sal_uInt32 nArgs, oslProcess *pProcess,
     oslFileHandle *pIn, oslFileHandle *pOut, oslFileHandle *pErr)
 {
-    oslProcessError result;
+    oslProcessError result = osl_Process_E_None;
     oslSecurity pSecurity = osl_getCurrentSecurity();
 #ifdef _WIN32
     /*
@@ -174,11 +174,11 @@ static oslProcessError runProcessWithPathSearch(const OUString &rProgName,
 
     oslFileError err = osl_searchFileURL(rProgName.pData, path.pData, &url.pData);
     if (err != osl_File_E_None)
-        return osl_Process_E_NotFound;
-
-    result = osl_executeProcess_WithRedirectedIO(url.pData,
-    pArgs, nArgs, osl_Process_HIDDEN,
-        pSecurity, nullptr, nullptr, 0, pProcess, pIn, pOut, pErr);
+        result = osl_Process_E_NotFound;
+    else
+        result = osl_executeProcess_WithRedirectedIO(url.pData,
+            pArgs, nArgs, osl_Process_HIDDEN,
+            pSecurity, nullptr, nullptr, 0, pProcess, pIn, pOut, pErr);
 #else
     result = osl_executeProcess_WithRedirectedIO(rProgName.pData,
         pArgs, nArgs, osl_Process_SEARCHPATH | osl_Process_HIDDEN,


More information about the Libreoffice-commits mailing list