aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--text.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/text.c b/text.c
index 1227136..f47ccbc 100644
--- a/text.c
+++ b/text.c
@@ -870,6 +870,7 @@ static bool text_range_save_atomic(Text *txt, Filerange *range, const char *file
fd = -1;
goto err;
}
+ fd = -1;
if (rename(tmpname, filename) == -1)
goto err;