summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-05-13 12:59:37 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-05-13 12:59:37 +0000
commita1d9844c940ec385d3ec35966656103e0ba68068 (patch)
tree4f4a78033ce39fbc014a3d23201f94d9e298986a
parent030279d56862117005bbba798764e02627a83052 (diff)
INTEGRATION: CWS cmcfixes44 (1.5.16); FILE MERGED
2008/04/24 07:55:46 cmc 1.5.16.1: #i88676# osl_freeProcessHandle is missing after a successful call to osl_executeProcess
-rw-r--r--framework/source/jobs/shelljob.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx
index 92a7922833d6..91c44d65703b 100644
--- a/framework/source/jobs/shelljob.cxx
+++ b/framework/source/jobs/shelljob.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: shelljob.cxx,v $
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
* This file is part of OpenOffice.org.
*
@@ -208,18 +208,21 @@ css::uno::Any ShellJob::impl_generateAnswer4Deactivation()
if (eError != osl_Process_E_None)
return sal_False;
- if (! bCheckExitCode)
- return sal_True;
-
- // check it's return codes ...
- oslProcessInfo aInfo;
- aInfo.Size = sizeof (oslProcessInfo);
+ ::sal_Bool bRet = sal_True;
+ if (bCheckExitCode)
+ {
+ // check its return codes ...
+ oslProcessInfo aInfo;
+ aInfo.Size = sizeof (oslProcessInfo);
eError = osl_getProcessInfo(hProcess, osl_Process_EXITCODE, &aInfo);
- if (eError != osl_Process_E_None)
- return sal_False;
-
- return (aInfo.Code == 0);
+ if (eError != osl_Process_E_None)
+ bRet = sal_False;
+ else
+ bRet = (aInfo.Code == 0);
+ }
+ osl_freeProcessHandle(hProcess);
+ return bRet;
}
} // namespace framework