mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
NULL the fp pointer after it has been fclosed()
This commit is contained in:
parent
d3b414724b
commit
494c40fd98
@ -1299,9 +1299,11 @@ CURLcode Curl_http_done(struct connectdata *conn,
|
|||||||
conn->bytecount = http->readbytecount + http->writebytecount;
|
conn->bytecount = http->readbytecount + http->writebytecount;
|
||||||
|
|
||||||
Curl_formclean(http->sendit); /* Now free that whole lot */
|
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! */
|
/* a file being uploaded was left opened, close it! */
|
||||||
fclose(http->form.fp);
|
fclose(http->form.fp);
|
||||||
|
http->form.fp = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(HTTPREQ_PUT == data->set.httpreq)
|
else if(HTTPREQ_PUT == data->set.httpreq)
|
||||||
conn->bytecount = http->readbytecount + http->writebytecount;
|
conn->bytecount = http->readbytecount + http->writebytecount;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user