mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0525: spell: memory leak in spell_read_dic()
Problem: spell: memory leak in spell_read_dic() (after 9.2.0524). Solution: Free "pc" before breaking out of the loop (zeertzjq). closes: #20309 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
e60d4b4ff3
commit
6c8e125395
@@ -3704,6 +3704,7 @@ spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile)
|
||||
== FAIL)
|
||||
{
|
||||
retval = FAIL;
|
||||
vim_free(pc);
|
||||
break;
|
||||
}
|
||||
pfxlen = totlen;
|
||||
@@ -3717,6 +3718,7 @@ spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile)
|
||||
== FAIL)
|
||||
{
|
||||
retval = FAIL;
|
||||
vim_free(pc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -729,6 +729,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
525,
|
||||
/**/
|
||||
524,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user