diff --git a/lib/url.c b/lib/url.c index d253fe566c1db060419aa7a6dbb726648559302d..3930da5e24a859fa62f420a12e27e82dbf98faf1 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);