comparison src/term.c @ 18838:8dabdfc7c799 v8.1.2406

patch 8.1.2406: leaking memory in test_paste and test_registers Commit: https://github.com/vim/vim/commit/6b649ac4fd0cbf88c5a05d82ad151d0ce980916a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 7 17:47:22 2019 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 Dec 2019 18:00:03 +0100
parents 7e7ec935e7c8
children 847cc7932c42
comparison
equal deleted inserted replaced
18837:00e789ecc516 18838:8dabdfc7c799
2104 static char * 2104 static char *
2105 tgetent_error(char_u *tbuf, char_u *term) 2105 tgetent_error(char_u *tbuf, char_u *term)
2106 { 2106 {
2107 int i; 2107 int i;
2108 2108
2109 // Note: Valgrind may report a leak here, because the library keeps one
2110 // buffer around that we can't ever free.
2109 i = TGETENT(tbuf, term); 2111 i = TGETENT(tbuf, term);
2110 if (i < 0 // -1 is always an error 2112 if (i < 0 // -1 is always an error
2111 # ifdef TGETENT_ZERO_ERR 2113 # ifdef TGETENT_ZERO_ERR
2112 || i == 0 // sometimes zero is also an error 2114 || i == 0 // sometimes zero is also an error
2113 # endif 2115 # endif