http://bugs.winehq.org/show_bug.cgi?id=33447
--- Comment #18 from Qian Hong fracting@gmail.com 2013-04-29 14:10:10 CDT --- Created attachment 44332 --> http://bugs.winehq.org/attachment.cgi?id=44332 Patch: partial fix v2
(In reply to comment #17)
Hi Qian,
You leak the objected created by CFLocaleCreateCanonicalLanguageIdentifierFromString(), though. In general, Core Foundation functions with "Create" or "Copy" in their names return an object that the caller is responsible for releasing.
Aha, good catch, thanks!
Also, I wouldn't bother with the new user_locale_string_utf8_ref variable. Instead, just get the C string from user_locale_string_ref into user_locale and then strcat ".UTF-8" onto it.
Good idea, thanks.
Thanks a lot for review, how about this one?