← Commit list

ca1919caee

Viktor Szakats
Viktor Szakats
2025-12-01
SUCCESS Duration: 176s

Subject

idn: fix memory leak in `win32_ascii_to_idn()`

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/idn.c+1 -0
@@ -201,6 +201,7 @@ static CURLcode win32_ascii_to_idn(const char *in, char **output)
WCHAR idn[IDN_MAX_LENGTH]; /* stores a UTF-16 string */
int chars = IdnToUnicode(0, in_w, (int)(wcslen(in_w) + 1), idn,
IDN_MAX_LENGTH);
+ curlx_unicodefree(in_w);
if(chars) {
/* 'chars' is "the number of characters retrieved" */
char *mstr = curlx_convert_wchar_to_UTF8(idn);