Skip to content

Commit

Permalink
patch 9.0.1901: win32: not correctly freeing environment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
k-takata authored and chrisbra committed Sep 16, 2023
1 parent e7d79eb commit ad29f6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/os_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1901,
/**/
1900,
/**/
Expand Down

0 comments on commit ad29f6a

Please sign in to comment.