summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-07-25 19:07:04 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-25 19:07:04 +0100
commit0c740e745a5f8702fd87689615a9684664e40764 (patch)
tree831d8a97fb726de357411fa8ed16878d3f02b766
parentfe3fb6e1e6c90e9bada05518a13a72b3fc2f6a98 (diff)
downloadvim-git-9.0.0069.tar.gz
patch 9.0.0069: leaking memory when using text prop with inserted textv9.0.0069
Problem: Leaking memory when using text prop with inserted text. Solution: Clear the growarray with text.
-rw-r--r--src/buffer.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index bbbfdb781..436c0e951 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1004,6 +1004,9 @@ free_buffer_stuff(
#ifdef FEAT_NETBEANS_INTG
netbeans_file_killed(buf);
#endif
+#ifdef FEAT_PROP_POPUP
+ ga_clear_strings(&buf->b_textprop_text);
+#endif
map_clear_mode(buf, MAP_ALL_MODES, TRUE, FALSE); // clear local mappings
map_clear_mode(buf, MAP_ALL_MODES, TRUE, TRUE); // clear local abbrevs
VIM_CLEAR(buf->b_start_fenc);
diff --git a/src/version.c b/src/version.c
index 04e01007c..a07ccb748 100644
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 69,
+/**/
68,
/**/
67,