Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: fix some misuse of curlx_convert_wchar_to_UTF8 #8521

Closed
wants to merge 2 commits into from

Conversation

jay
Copy link
Member

@jay jay commented Feb 28, 2022

curlx_convert_wchar_to_UTF8 must be freed by curlx_unicodefree, but
prior to this change some uses mistakenly called free.

I've reviewed all other uses of curlx_convert_wchar_to_UTF8 and
curlx_convert_UTF8_to_wchar.

Ref: 1d5d0ae

Closes #xxxx


Sort of related: I find it confusing that in non-Unicode builds curlx_convert_UTF8_to_tchar and curlx_convert_tchar_to_UTF8 just duplicate the string in its current encoding, and a while ago I added a comment here but it's still easy to forget. Since the purpose of those functions in non-unicode builds is just to use the current encoding then wouldn't it be better to call them curlx_convert_multibyte_to_tchar and curlx_convert_tchar_to_multibyte?

curlx_convert_wchar_to_UTF8 must be freed by curlx_unicodefree, but
prior to this change some uses mistakenly called free.

I've reviewed all other uses of curlx_convert_wchar_to_UTF8 and
curlx_convert_UTF8_to_wchar.

Ref: curl@1d5d0ae

Closes #xxxx
@jay jay added the Windows label Feb 28, 2022
@jay jay deleted the fix_curlx_convert_misuse2 branch Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant