0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.2406: leaking memory in test_paste and test_registers

Problem:    Leaking memory in test_paste and test_registers.
Solution:   Free the old title.  Don't copy expr_line.
This commit is contained in:
Bram Moolenaar
2019-12-07 17:47:22 +01:00
parent 1f9a028def
commit 6b649ac4fd
4 changed files with 10 additions and 2 deletions

View File

@@ -1963,6 +1963,10 @@ get_x11_thing(
retval = TRUE;
if (!test_only)
{
if (get_title)
vim_free(oldtitle);
else
vim_free(oldicon);
if (text_prop.encoding == XA_STRING && !has_mbyte)
{
if (get_title)