1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2020-11-10 22:03:40 +01:00
parent 29b281ba8d
commit bbf9f344af
2 changed files with 5 additions and 0 deletions

View File

@@ -3532,7 +3532,10 @@ mch_get_acl(char_u *fname)
wn = enc_to_utf16(fname, NULL); wn = enc_to_utf16(fname, NULL);
if (wn == NULL) if (wn == NULL)
{
vim_free(p);
return NULL; return NULL;
}
// Try to retrieve the entire security descriptor. // Try to retrieve the entire security descriptor.
err = GetNamedSecurityInfoW( err = GetNamedSecurityInfoW(

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1975,
/**/ /**/
1974, 1974,
/**/ /**/