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.
diff --git a/src/term.c b/src/term.c
index 57384f4..b0ab7c6 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2106,6 +2106,8 @@
{
int i;
+ // Note: Valgrind may report a leak here, because the library keeps one
+ // buffer around that we can't ever free.
i = TGETENT(tbuf, term);
if (i < 0 // -1 is always an error
# ifdef TGETENT_ZERO_ERR