From ca1919caee6a82e400acdc491179b748f38c5ede Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 1 Dec 2025 15:52:10 +0100 Subject: [PATCH] idn: fix memory leak in `win32_ascii_to_idn()` Closes #19789 --- lib/idn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/idn.c b/lib/idn.c index 1c404f6543..38f2845f26 100644 --- a/lib/idn.c +++ b/lib/idn.c @@ -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);