aboutsummaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'http.c')
-rw-r--r--http.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/http.c b/http.c
index 6410192..806171d 100644
--- a/http.c
+++ b/http.c
@@ -649,7 +649,11 @@ static void ctx_free(struct ctx *const c)
fprintf(stderr, "%s: fclose(3) p->f: %s\n",
__func__, strerror(errno));
- free(c->u.put.tmpname);
+ if (p->tmpname && remove(p->tmpname) && errno != ENOENT)
+ fprintf(stderr, "%s: remove(3) %s: %s\n",
+ __func__, p->tmpname, strerror(errno));
+
+ free(p->tmpname);
}
free(c->field);