coverity#983099: fix memory leak
Change-Id: I2fe582bc9b082ab4cac7cc7e6c521087f4906436
This commit is contained in:
parent
ddf1b13a52
commit
c04fde0063
1 changed files with 3 additions and 1 deletions
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue