From: zeertzjq Date: Sun, 24 May 2026 09:03:59 +0000 (+0000) Subject: patch 9.2.0525: spell: memory leak in spell_read_dic() X-Git-Tag: v9.2.0525^0 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=6c8e125395cc77a67c7ddb95422684ff84a54e58;p=thirdparty%2Fvim.git 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 Signed-off-by: Christian Brabandt --- diff --git a/src/spellfile.c b/src/spellfile.c index f1841ddf37..8a373f343f 100644 --- a/src/spellfile.c +++ b/src/spellfile.c @@ -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; } } diff --git a/src/version.c b/src/version.c index f3cfeb60a8..175d7ab57c 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 525, /**/ 524, /**/