From: Daniel Stenberg Date: Thu, 16 Dec 2004 13:55:19 +0000 (+0000) Subject: NULL the fp pointer after it has been fclosed() X-Git-Tag: curl-7_12_3~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=494c40fd983ef591dd37c2901d8a24554ace7a95;p=thirdparty%2Fcurl.git NULL the fp pointer after it has been fclosed() --- diff --git a/lib/http.c b/lib/http.c index 79e51b752f..8e4ee7d828 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;