Skip to content

Commit bbf9f34

Browse files
committed
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)
1 parent 29b281b commit bbf9f34

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/os_win32.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,7 +3532,10 @@ mch_get_acl(char_u *fname)
35323532

35333533
wn = enc_to_utf16(fname, NULL);
35343534
if (wn == NULL)
3535+
{
3536+
vim_free(p);
35353537
return NULL;
3538+
}
35363539

35373540
// Try to retrieve the entire security descriptor.
35383541
err = GetNamedSecurityInfoW(

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
1975,
753755
/**/
754756
1974,
755757
/**/

0 commit comments

Comments
 (0)