diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2020-05-18 13:41:31 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2020-05-18 20:24:16 +0200 |
commit | 835bced249e95ccbf0a88266f8c1ba166cf5efcb (patch) | |
tree | db746133bc669c33c0b3b4e014424e6365b3adfd | |
parent | c50315c55dbb5daf86ccb2a91468c05a53e926e9 (diff) |
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@yahoo.fr>
-rw-r--r-- | filter/source/graphicfilter/ieps/ieps.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
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, |