0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

patch 9.0.1901: win32: not correctly freeing environment

Problem:  win32: not correctly freeing environment
Solution: After we call GetEnvironmentStringsW, we should call
          FreeEnvironmentStringsW

closes: #13096
closes: #13094

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
This commit is contained in:
Ken Takata 2023-09-16 13:56:02 +02:00 committed by Christian Brabandt
parent e7d79eb98a
commit ad29f6af0a
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 3 additions and 1 deletions

View File

@ -5788,7 +5788,7 @@ win32_build_env(dict_T *env, garray_T *gap, int is_terminal)
*((WCHAR*)gap->ga_data + gap->ga_len++) = *p;
p++;
}
FreeEnvironmentStrings(base);
FreeEnvironmentStringsW(base);
*((WCHAR*)gap->ga_data + gap->ga_len++) = L'\0';
}

View File

@ -699,6 +699,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1901,
/**/
1900,
/**/