]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1901: win32: not correctly freeing environment v9.0.1901
authorKen Takata <kentkt@csc.jp>
Sat, 16 Sep 2023 11:56:02 +0000 (13:56 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 16 Sep 2023 11:56:02 +0000 (13:56 +0200)
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>
src/os_win32.c
src/version.c

index ff60e04aed9b51b321dbaf53e34c347c0e360ea6..7891944dabdc185ff05d767ff521c295b8007301 100644 (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';
     }
 
index edfd63539edd1b596b6144b501d84a76838ec6e0..a0e61566ad76caf6f88bf4751f21f13ee6218f8d 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1901,
 /**/
     1900,
 /**/