From 9f1c3c85135d795018747fa281d17c97efed54f2 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 30 Mar 2020 16:51:34 +0200 Subject: [PATCH] memory: plug a leak, by freeing the cutbuffer after a bracketed paste Also, remove an unneeded assignment -- the 'cutbottom' variable is needed only when consecutives cuts (^K) or copies (M-6) are made. --- src/nano.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nano.c b/src/nano.c index b9dc1630..440db100 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1483,10 +1483,9 @@ void suck_up_input_and_paste_it(void) beep(); } - cutbottom = line; - paste_text(); + free_lines(cutbuffer); cutbuffer = was_cutbuffer; } #endif