From 110c2d669014e1b0ecd54a9a0d44d3a83e5bb751 Mon Sep 17 00:00:00 2001 From: Eric Branlund Date: Wed, 13 Nov 2019 22:41:26 -0800 Subject: [PATCH] In remove_old_dump(), the current file was not closed if opening the new file failed. --- src/ui-prefs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui-prefs.c b/src/ui-prefs.c index e71e6b3b..0d44c303 100644 --- a/src/ui-prefs.c +++ b/src/ui-prefs.c @@ -104,6 +104,7 @@ static void remove_old_dump(const char *cur_fname, const char *mark) /* Open new file */ new_file = file_open(new_fname, MODE_WRITE, FTYPE_TEXT); if (!new_file) { + file_close(cur_file); msg("Failed to create file %s", new_fname); return; } -- 2.21.0 (Apple Git-122.2)