Index: sal/osl/unx/osxlocale.cxx =================================================================== RCS file: /cvs/porting/sal/osl/unx/osxlocale.cxx,v retrieving revision 1.2 diff -u -r1.2 osxlocale.cxx --- sal/osl/unx/osxlocale.cxx 3 Jul 2007 12:49:13 -0000 1.2 +++ sal/osl/unx/osxlocale.cxx 27 Aug 2007 10:38:21 -0000 @@ -96,7 +96,9 @@ CFStringRef lang = (CFStringRef)CFArrayGetValueAtIndex(subs, 0); CFStringGetCString(lang, locale, bufferLen, kCFStringEncodingASCII); - + if ( lang ) + CFRelease( lang); + // country also available? Assumption: if the array contains more than one // value the second value is always the country! if (CFArrayGetCount(subs) > 1) @@ -128,7 +130,8 @@ sCFEncodingName = CFStringConvertEncodingToIANACharSetName( cfEncoding ); CFStringGetCString( sCFEncodingName, buffer, bufferLen, cfEncoding ); - + if ( sCFEncodingName ) + CFRelease( sCFEncodingName); return( noErr ); }