aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-08 18:02:36 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-08 18:17:32 +0100
commite37a0248e865db2d69c89d5c7bd8651dae255cab (patch)
treec5b2485c885aa55b527921bc0cda2de3dbe90d03 /main.c
parent6cbab96869cbee4c7d6fed95d30221903c616aa5 (diff)
downloadslcl-e37a0248e865db2d69c89d5c7bd8651dae255cab.tar.gz
Remove(3) f->tmpname from ctx_free
Until now, f->tmpname was removed by move_file when the move operation succeeded. However, since a HTTP operation can fail before move_file is called, the temporary file must also be removed.
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/main.c b/main.c
index 7b8f463..2256fe7 100644
--- a/main.c
+++ b/main.c
@@ -638,11 +638,6 @@ end:
fprintf(stderr, "%s: fclose(3): %s\n", __func__, strerror(errno));
ret = -1;
}
- else if (remove(old))
- {
- fprintf(stderr, "%s: remove(3): %s\n", __func__, strerror(errno));
- ret = -1;
- }
return ret;
}