commit 5ddae408842ce5659f7323ab1d4967a2f10e9431 parent f473a4b7060fbdcf38617067851e855acef9d5e9 Author: phoebos <ben@bvnf.space> Date: Thu, 23 Sep 2021 20:32:34 +0100 ed: fix final freeing up Diffstat:
M | ed.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ed.c b/ed.c @@ -284,9 +284,10 @@ main(int argc, char **argv) { ed(startfile); free(buf_start); struct line *x = first; - while (x) { + while (x != first) { x = x->next; free(x); } + free(first); return 0; }