summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-05-24 09:58:49 +0200
committerJulien Nabet <serval2412@yahoo.fr>2020-05-24 09:59:32 +0200
commitf7a77ec55a94bcac13cde7c7e7644d70771b6098 (patch)
tree2bd48cfcc639762aee6d2238ec779c2d436af6fb /extensions
parent7637547123b00a9b07ef8659bc077be85cba0a89 (diff)
Revert "Fix leak in extensions/updatecheck"
This reverts commit 05ab836cf3001093a6e375bcb3e4654bbedcfa52 since it's wrong Reason for revert: <INSERT REASONING HERE> Change-Id: Ibdc97c6507fb081e34fdaabd65f61a01057300f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94676 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/update/check/updatecheck.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 217c05986129..a4e18c193046 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <comphelper/scopeguard.hxx>
#include <config_folders.h>
#include "updatecheck.hxx"
@@ -137,12 +136,6 @@ OUString getImageFromFileName(const OUString& aFile)
nullptr, &hOut, nullptr // [out] File handles for redirected I/O
);
- // Create a guard to ensure correct cleanup in its dtor in any case
- comphelper::ScopeGuard g([hOut, hProcess] () {
- osl_closeFile(hOut);
- osl_freeProcessHandle(hProcess);
- });
-
if( osl_Process_E_None == rc )
{
oslProcessInfo aInfo;
@@ -176,6 +169,9 @@ OUString getImageFromFileName(const OUString& aFile)
return aImageName;
}
}
+
+ osl_closeFile(hOut);
+ osl_freeProcessHandle(hProcess);
}
}
#endif