]> git.feebdaed.xyz Git - 0xmirror/curl.git/commitdiff
curlx: use curl alloc in `curlx_win32_stat()` (Windows)
authorViktor Szakats <commit@vsz.me>
Sat, 20 Dec 2025 00:54:35 +0000 (01:54 +0100)
committerViktor Szakats <commit@vsz.me>
Sat, 20 Dec 2025 11:06:25 +0000 (12:06 +0100)
It's safe because we do not call `curlx_win32_stat()` from memdebug.c.

Closes #20043

lib/curlx/fopen.c

index 75ff63901e8192b4b460e860515a821710c305f9..5de9a13a795097361d7ba8e8919892b5113e1b01 100644 (file)
@@ -367,14 +367,14 @@ int curlx_win32_stat(const char *path, struct_stat *buffer)
   const TCHAR *target = NULL;
 
 #ifdef _UNICODE
-  wchar_t *path_w = fn_convert_UTF8_to_wchar(path);
+  wchar_t *path_w = curlx_convert_UTF8_to_wchar(path);
   if(path_w) {
     if(fix_excessive_path(path_w, &fixed))
       target = fixed;
     else
       target = path_w;
     result = _wstati64(target, buffer);
-    CURLX_FREE(path_w);
+    curlx_free(path_w);
   }
   else
     /* !checksrc! disable ERRNOVAR 1 */