aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-12-16 13:55:19 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-12-16 13:55:19 +0000
commit494c40fd983ef591dd37c2901d8a24554ace7a95 (patch)
tree27bb7c001159c4b85e7afd33676644f371725570
parentd3b414724b18e84ed32c044527aac9a85e434690 (diff)
NULL the fp pointer after it has been fclosed()
-rw-r--r--lib/http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c
index 79e51b752..8e4ee7d82 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1299,9 +1299,11 @@ 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)
+ if(http->form.fp) {
/* a file being uploaded was left opened, close it! */
fclose(http->form.fp);
+ http->form.fp = NULL;
+ }
}
else if(HTTPREQ_PUT == data->set.httpreq)
conn->bytecount = http->readbytecount + http->writebytecount;