summaryrefslogtreecommitdiffstats
path: root/src/os_win32.c
diff options
context:
space:
mode:
authorKen Takata <kentkt@csc.jp>2023-09-16 13:56:02 +0200
committerChristian Brabandt <cb@256bit.org>2023-09-16 13:56:02 +0200
commitad29f6af0a2edcd1c9e78d8defe86b2155937f7c (patch)
tree6113c0a1d06d55c78b854722141128ee050aad47 /src/os_win32.c
parente7d79eb98a30c529cf53fb4852a71b9fd1336c41 (diff)
patch 9.0.1901: win32: not correctly freeing environmentv9.0.1901
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>
Diffstat (limited to 'src/os_win32.c')
-rw-r--r--src/os_win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index ff60e04aed..7891944dab 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -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';
}