diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-08-02 21:07:18 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-08-02 22:17:10 -0500 |
commit | 0b468e9f16dbd6bdc06064672b8c78ca91f55ef9 (patch) | |
tree | 97570efaa1d1aa458af56615c592ce96bb0067d4 /sal | |
parent | 3961c28659c961351d1b2b0d5cb5551d4940e8c3 (diff) |
CFErrorRef is apparently not always initialized by the callee
on 10.6 SDK this coredumped in some case in CFRelease(cferror)
Maing sure that cferror is initialized to NULL
avoid the problem
Change-Id: I5624416867670bfd4c8db9b35e3b3d37494f79fd
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/system.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sal/osl/unx/system.c b/sal/osl/unx/system.c index 20621a63e6ae..55a5bb5a1841 100644 --- a/sal/osl/unx/system.c +++ b/sal/osl/unx/system.c @@ -169,12 +169,15 @@ int macxp_resolveAlias(char *path, int buflen) CFStringRef cfpath = CFStringCreateWithCString( NULL, path, kCFStringEncodingUTF8 ); CFURLRef cfurl = CFURLCreateWithFileSystemPath( NULL, cfpath, kCFURLPOSIXPathStyle, false ); CFRelease( cfpath ); - CFErrorRef cferror; + CFErrorRef cferror = NULL; CFDataRef cfbookmark = CFURLCreateBookmarkDataFromFile( NULL, cfurl, &cferror ); CFRelease( cfurl ); if ( cfbookmark == NULL ) { - CFRelease( cferror ); + if(cferror) + { + CFRelease( cferror ); + } } else { |