From e8505b2d3ed490be3ab04006b3d7569c261581f4 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 11 Mar 2018 20:06:24 +0100 Subject: [PATCH] memory: plug a leak, by actually freeing a discarded undo struct This fixes https://savannah.gnu.org/bugs/?53269. Reported-by: Ashish Kunwar The leak was mistakenly introduced by commit dc3618a1 -- probably as a leftover of testing things. --- src/text.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/text.c b/src/text.c index af1e02cb..68b64ed3 100644 --- a/src/text.c +++ b/src/text.c @@ -1184,6 +1184,7 @@ void discard_until(const undo *thisitem, openfilestruct *thefile, bool keep) free(group); group = next; } + free(dropit); dropit = thefile->undotop; }