[Libreoffice-commits] core.git: fpicker/source

Julien Nabet serval2412 at yahoo.fr
Wed Oct 4 06:56:55 UTC 2017


 fpicker/source/aqua/NSURL_OOoAdditions.mm |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 7413ee067f1184747b3e2b6580577d05e35a7cc9
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Oct 3 22:44:02 2017 +0200

    Fix leak in resolveAlias (fpicker/aqua)
    
    Change-Id: I9b154337769763139ee5571d4ec8df9cfb6208f9
    Reviewed-on: https://gerrit.libreoffice.org/43104
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Julien Nabet <serval2412 at yahoo.fr>

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,


More information about the Libreoffice-commits mailing list