diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c index d984eddc1..79e51b752 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1299,6 +1299,9 @@ CURLcode Curl_http_done(struct connectdata *conn, conn->bytecount = http->readbytecount + http->writebytecount; Curl_formclean(http->sendit); /* Now free that whole lot */ + if(http->form.fp) + /* a file being uploaded was left opened, close it! */ + fclose(http->form.fp); } else if(HTTPREQ_PUT == data->set.httpreq) conn->bytecount = http->readbytecount + http->writebytecount; |