From: Viktor Szakats Date: Mon, 1 Dec 2025 14:52:10 +0000 (+0100) Subject: idn: fix memory leak in `win32_ascii_to_idn()` X-Git-Tag: rc-8_18_0-1~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca1919caee6a82e400acdc491179b748f38c5ede;p=thirdparty%2Fcurl.git idn: fix memory leak in `win32_ascii_to_idn()` Closes #19789 --- 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);