From 286a9f77bcd55a59ef6db186fdf2c064590b1b3a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 11 Nov 2016 21:54:52 +0530 Subject: [PATCH] Fix a memory leak in rewrap() --- kitty/line-buf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kitty/line-buf.c b/kitty/line-buf.c index 009cfd6d0..7f314d0c4 100644 --- a/kitty/line-buf.c +++ b/kitty/line-buf.c @@ -397,6 +397,7 @@ static inline void copy_range(Line *src, index_type src_at, Line* dest, index_ty PyObject *l = create_line_copy_inner(dest, dest_y); \ if (l == NULL) return false; \ if (PyList_Append(extra_lines, l) != 0) { Py_CLEAR(l); return false; } \ + Py_CLEAR(l); \ } else dest_y++; \ INIT_LINE(dest, dest->line, dest->line_map[dest_y]); \ dest->continued_map[dest_y] = continued; \