Problem: Leaking memory in test_paste and test_registers.
Solution: Free the old title. Don't copy expr_line.
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)
p = vim_strnsave(str, (int)len);
if (p == NULL)
return;
- if (must_append)
+ if (must_append && expr_line != NULL)
{
- s = concat_str(get_expr_line_src(), p);
+ s = concat_str(expr_line, p);
vim_free(p);
p = s;
}
{
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2406,
/**/
2405,
/**/