aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-04-11 19:27:57 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-04-13 12:00:34 -0400
commitbdf629775b42c3bc640cfd284d4132a2b06b657b (patch)
tree58de34e536bb6a8f04c2c8b25474a00f5655fe27
parent572627255983b7733b6ad05da52b3e704aae8a2f (diff)
downloadrneovim-bdf629775b42c3bc640cfd284d4132a2b06b657b.tar.gz
rneovim-bdf629775b42c3bc640cfd284d4132a2b06b657b.tar.bz2
rneovim-bdf629775b42c3bc640cfd284d4132a2b06b657b.zip
vim-patch:8.2.0544: memory leak in search test
Problem: Memory leak in search test. Solution: Free msgbuf. (Dominique Pelle, closes vim/vim#5912) https://github.com/vim/vim/commit/880e4d9117ea990e66d867aefad0f73ba89bda82
-rw-r--r--src/nvim/search.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 7d00785c74..23086c629b 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -1192,6 +1192,7 @@ int do_search(
len = STRLEN(p) + off_len + 3;
}
+ xfree(msgbuf);
msgbuf = xmalloc(len);
{
memset(msgbuf, ' ', len);