about summary refs log tree commit homepage
path: root/http_put.c
diff options
context:
space:
mode:
Diffstat (limited to 'http_put.c')
-rw-r--r--http_put.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/http_put.c b/http_put.c
index f86113e..db9228d 100644
--- a/http_put.c
+++ b/http_put.c
@@ -14,18 +14,9 @@ static __thread struct {
 
 static void file_close_null(struct mog_http *http)
 {
-        struct mog_file *file;
-
         if (http->forward == NULL)
                 return;
-
-        file = &http->forward->as.file;
-
-        if (file->tmppath) {
-                if (mog_unlink(http->svc, file->tmppath) != 0)
-                        syslog(LOG_ERR, "Failed to unlink %s (in %s): %m",
-                               file->tmppath, http->svc->docroot);
-        }
+        mog_http_unlink_ftmp(http);
         mog_file_close(http->forward);
         http->forward = NULL;
 }