src: avoid strdup on platforms not doing UTF8 conversions

... and use more const strings.

Closes #16560
This commit is contained in:
Daniel Stenberg 2025-03-04 17:50:37 +01:00
parent 7298c4320b
commit ed15fce1fd
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 73 additions and 41 deletions

View file

@ -84,7 +84,7 @@ typedef union {
#define curlx_unicodefree(ptr) \
do { \
if(ptr) { \
(free)(ptr); \
(free)((char *)ptr); \
(ptr) = NULL; \
} \
} while(0)