From: Daniel Stenberg Date: Fri, 28 Jul 2000 07:56:06 +0000 (+0000) Subject: clear the httproxy bit on cleanup if the allocproxy bit was set X-Git-Tag: curl-7_1_1~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=215c75135b687461ed1a5f4f0e9ef0fba1af0d46;p=thirdparty%2Fcurl.git clear the httproxy bit on cleanup if the allocproxy bit was set --- diff --git a/lib/url.c b/lib/url.c index d253fe566c..3930da5e24 100644 --- a/lib/url.c +++ b/lib/url.c @@ -172,11 +172,15 @@ void urlfree(struct UrlData *data, bool totally) } if(data->bits.proxystringalloc) { - data->bits.proxystringalloc=0; + data->bits.proxystringalloc=FALSE;; free(data->proxy); data->proxy=NULL; + + /* Since we allocated the string the previous round, it means that we + "discovered" the proxy in the environment variables and thus we must + switch off that knowledge again... */ + data->bits.httpproxy=FALSE; } - if(data->ptr_proxyuserpwd) { free(data->ptr_proxyuserpwd);