summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-12-07 17:47:22 +0100
committerBram Moolenaar <Bram@vim.org>2019-12-07 17:47:22 +0100
commit6b649ac4fd0cbf88c5a05d82ad151d0ce980916a (patch)
tree3e59a10e5b1b750270254df7b484d8956b75b766 /src/os_unix.c
parent1f9a028def327bd9bbfef375cb1283cd51e04678 (diff)
downloadvim-git-6b649ac4fd0cbf88c5a05d82ad151d0ce980916a.tar.gz
patch 8.1.2406: leaking memory in test_paste and test_registersv8.1.2406
Problem: Leaking memory in test_paste and test_registers. Solution: Free the old title. Don't copy expr_line.
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 90c5aed97..7e7820934 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -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)