memory: plug a leak, by actually freeing a discarded undo struct

This fixes https://savannah.gnu.org/bugs/?53269.
Reported-by: Ashish Kunwar <dorkerdevil280@gmail.com>

The leak was mistakenly introduced by commit dc3618a1
-- probably as a leftover of testing things.
This commit is contained in:
Benno Schulenberg 2018-03-11 20:06:24 +01:00
parent 1ebb1da382
commit e8505b2d3e

View File

@ -1184,6 +1184,7 @@ void discard_until(const undo *thisitem, openfilestruct *thefile, bool keep)
free(group);
group = next;
}
free(dropit);
dropit = thefile->undotop;
}