diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-10-03 22:44:02 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-10-04 08:56:32 +0200 |
commit | 7413ee067f1184747b3e2b6580577d05e35a7cc9 (patch) | |
tree | 3d263071e7edcbf51fe013137fb50e4867aa542f /fpicker/source/aqua/NSURL_OOoAdditions.mm | |
parent | de05a4ff2091a82ad9fc541676b9e0bfae74a5da (diff) |
Fix leak in resolveAlias (fpicker/aqua)
Change-Id: I9b154337769763139ee5571d4ec8df9cfb6208f9
Reviewed-on: https://gerrit.libreoffice.org/43104
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'fpicker/source/aqua/NSURL_OOoAdditions.mm')
-rw-r--r-- | fpicker/source/aqua/NSURL_OOoAdditions.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fpicker/source/aqua/NSURL_OOoAdditions.mm b/fpicker/source/aqua/NSURL_OOoAdditions.mm index 9753ed082d34..7c63b79bc0c6 100644 --- a/fpicker/source/aqua/NSURL_OOoAdditions.mm +++ b/fpicker/source/aqua/NSURL_OOoAdditions.mm @@ -86,7 +86,11 @@ NSString* resolveAlias( NSString* i_pSystemPath ) CFErrorRef rError; CFDataRef rBookmark = CFURLCreateBookmarkDataFromFile( nullptr, rUrl, &rError ); CFRelease( rUrl ); - if( rBookmark != nullptr ) + if( rBookmark == nullptr ) + { + CFRelease( rError ); + } + else { Boolean bIsStale; CFURLRef rResolvedUrl = CFURLCreateByResolvingBookmarkData( kCFAllocatorDefault, rBookmark, kCFBookmarkResolutionWithoutUIMask, |