aboutsummaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-07-07 09:54:10 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-07-07 10:15:43 +0200
commit247d4c83e48da09918dc718fb4098d51d12b85af (patch)
tree77b6389dbd840654a05d5a2c653990d0e13b5d54 /text.c
parentd6d8f777f0e899323ed531453828c2153cb08a16 (diff)
downloadvis-247d4c83e48da09918dc718fb4098d51d12b85af.tar.gz
vis-247d4c83e48da09918dc718fb4098d51d12b85af.tar.xz
text: avoid double close in error case
Diffstat (limited to 'text.c')
-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;