commit | bbf9f344afd08954163191ed678352fb554fc254 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Nov 10 22:03:40 2020 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Nov 10 22:03:40 2020 +0100 |
tree | f2d85a1e57d6374f664966f47a6d9264bedfe011 | |
parent | 29b281ba8ddf176ae34b22e6a9b8e0ddcbcce665 [diff] [blame] |
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(