summaryrefslogtreecommitdiffstats
path: root/sal/osl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-02 11:29:44 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-03 04:35:05 +0100
commitc04fde0063276e3d5a6de3e077c1c822ed1ad25e (patch)
tree19d2900ca21d90694d46045e02e6dd7e6a62a9d7 /sal/osl
parentsal_Bool to bool (diff)
downloadcore-c04fde0063276e3d5a6de3e077c1c822ed1ad25e.tar.gz
core-c04fde0063276e3d5a6de3e077c1c822ed1ad25e.zip
coverity#983099: fix memory leak
Change-Id: I2fe582bc9b082ab4cac7cc7e6c521087f4906436
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/unx/file_url.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx
index 203d17f3d38b..e800a598a0c9 100644
--- a/sal/osl/unx/file_url.cxx
+++ b/sal/osl/unx/file_url.cxx
@@ -332,7 +332,9 @@ oslFileError SAL_CALL osl_getFileURLFromSystemPath( rtl_uString *ustrSystemPath,
if( ( 1 == ustrSystemPath->length ) || ( (sal_Unicode)'/' == ustrSystemPath->buffer[1] ) )
{
/* osl_getHomeDir returns file URL */
- osl_getHomeDir( osl_getCurrentSecurity(), &pTmp );
+ oslSecurity pSecurity = osl_getCurrentSecurity();
+ osl_getHomeDir( pSecurity , &pTmp );
+ osl_freeSecurityHandle( pSecurity );
/* remove "file://" prefix */
rtl_uString_newFromStr_WithLength( &pTmp, pTmp->buffer + 7, pTmp->length - 7 );