patch 8.2.1975: Win32: memory leak when encoding conversion fails
Problem: Win32: memory leak when encoding conversion fails.
Solution: Free the allocated memory. (Ken Takata, closes #7277)
diff --git a/src/os_win32.c b/src/os_win32.c
index 52573fe..60c0463 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -3532,7 +3532,10 @@
wn = enc_to_utf16(fname, NULL);
if (wn == NULL)
+ {
+ vim_free(p);
return NULL;
+ }
// Try to retrieve the entire security descriptor.
err = GetNamedSecurityInfoW(
diff --git a/src/version.c b/src/version.c
index 06fa4d0..872c25a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1975,
+/**/
1974,
/**/
1973,