]> git.ipfire.org Git - thirdparty/curl.git/commit
windows: drop redundant `curl_wcsdup_callback` callback
authorViktor Szakats <commit@vsz.me>
Mon, 7 Jul 2025 09:46:26 +0000 (11:46 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 8 Jul 2025 11:33:38 +0000 (13:33 +0200)
commit8afb623bdd65b58876b1588f4280be00e5e84353
tree5655e31481d05f63a0a93736e23535300fbb8eb8
parentfa0ed1fe4f7de6519dfc5519728e3710bfe077fc
windows: drop redundant `curl_wcsdup_callback` callback

This callback was permanently mapped to libcurl's internal
`Curl_wcsdup()`, which always uses the customizable malloc for
allocation, thus making a custom mapping redundant anyway.

To simplify, drop the callback and map `_tcsdup()` in Unicode mode
directly to `Curl_wcsdup()`.

Also fixes:
- `curl_global_init()` which, before this patch, (re)initialized its
  mapping to `_wcsdup()`, returning buffers potentially incompatible
  with a custom allocator.
  Bug: https://github.com/curl/curl/pull/17840#issuecomment-3044361245
  Bug: https://github.com/curl/curl/pull/7540#issuecomment-2380995349
Co-reported-by: Luca Kellermann
Follow-up to 76e047fc27b3a0b9e6d6d00cacf536e7b7c1b532 #7540
Assisted-by: Jay Satiro
Closes #17843
lib/curl_memory.h
lib/curl_sspi.c
lib/easy.c
lib/setup-win32.h
lib/vauth/vauth.c
lib/vtls/schannel.c
tests/libtest/memptr.c
tests/server/memptr.c