patch 8.2.0880: leaking memory when using searchcount()
Problem: Leaking memory when using searchcount().
Solution: Free the last used search pattern.
diff --git a/src/search.c b/src/search.c
index e0b0f9b..a6b60f6 100644
--- a/src/search.c
+++ b/src/search.c
@@ -4147,6 +4147,7 @@
{
if (*pattern == NUL)
goto the_end;
+ vim_free(spats[last_idx].pat);
spats[last_idx].pat = vim_strsave(pattern);
}
if (spats[last_idx].pat == NULL || *spats[last_idx].pat == NUL)
diff --git a/src/version.c b/src/version.c
index 80be6d0..3a74509 100644
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 880,
+/**/
879,
/**/
878,