summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2013-07-17 12:11:26 +0200
committerDavid Tardon <dtardon@redhat.com>2013-07-17 10:57:21 +0000
commitcae861f0b32e01cb775214d783c98255acb60af0 (patch)
treef94d5786080416ef396cc19a4826ab1e409b42ec /sdext
parent4cf02127888589d66c90286e9994b5cf07ea3cab (diff)
Fix memory leak with osl_getCurrentSecurity ().
The result of osl_getCurrentSecurity () should always be deleted again with osl_freeSecurityHandle (). Change-Id: If0991937fcb24207d1f78166f61c4be22d423629 Reviewed-on: https://gerrit.libreoffice.org/4947 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 2adae2043bad..98c39e2e62bd 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -1083,14 +1083,16 @@ bool xpdf_ImportFromFile( const OUString& rURL,
oslFileHandle pIn = NULL;
oslFileHandle pOut = NULL;
oslFileHandle pErr = NULL;
+ oslSecurity pSecurity = osl_getCurrentSecurity ();
const oslProcessError eErr =
osl_executeProcess_WithRedirectedIO(converterURL.pData,
args,
nArgs,
osl_Process_SEARCHPATH|osl_Process_HIDDEN,
- osl_getCurrentSecurity(),
+ pSecurity,
0, ppEnv, nEnv,
&aProcess, &pIn, &pOut, &pErr);
+ osl_freeSecurityHandle(pSecurity);
bool bRet=true;
try