From 61e9152b112b22ee145d4775d7df7ed9a6ed8329 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 12 Nov 2008 12:57:25 +0000 Subject: 26028: close temporary file when aborting fc --- Src/builtin.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Src') diff --git a/Src/builtin.c b/Src/builtin.c index 0748eaccc..72c519037 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1480,6 +1480,7 @@ bin_fc(char *nam, char **argv, Options ops, int func) unqueue_signals(); zwarnnam("fc", "current history line would recurse endlessly, aborted"); + fclose(out); unlink(fil); return 1; } @@ -1619,6 +1620,8 @@ fclist(FILE *f, Options ops, zlong first, zlong last, zwarnnam("fc", "no such event: %s", buf); } else zwarnnam("fc", "no events in that range"); + if (f != stdout) + fclose(f); return 1; } -- cgit 1.4.1