summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-10 22:03:40 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-10 22:03:40 +0100
commitbbf9f344afd08954163191ed678352fb554fc254 (patch)
treef2d85a1e57d6374f664966f47a6d9264bedfe011
parent29b281ba8ddf176ae34b22e6a9b8e0ddcbcce665 (diff)
downloadvim-git-bbf9f344afd08954163191ed678352fb554fc254.tar.gz
patch 8.2.1975: Win32: memory leak when encoding conversion failsv8.2.1975
Problem: Win32: memory leak when encoding conversion fails. Solution: Free the allocated memory. (Ken Takata, closes #7277)
-rw-r--r--src/os_win32.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 52573fe62..60c04632c 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -3532,7 +3532,10 @@ mch_get_acl(char_u *fname)
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 06fa4d041..872c25a9b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1975,
+/**/
1974,
/**/
1973,