summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-07-28 07:56:06 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-07-28 07:56:06 +0000
commit215c75135b687461ed1a5f4f0e9ef0fba1af0d46 (patch)
tree19c25111db78d2b6ea5be5b09413faa35d3380cb
parentf50fd062e9552a0f98dd962c66f2a475b4994d78 (diff)
downloadgnurl-215c75135b687461ed1a5f4f0e9ef0fba1af0d46.tar.gz
gnurl-215c75135b687461ed1a5f4f0e9ef0fba1af0d46.tar.bz2
gnurl-215c75135b687461ed1a5f4f0e9ef0fba1af0d46.zip
clear the httproxy bit on cleanup if the allocproxy bit was set
-rw-r--r--lib/url.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index d253fe566..3930da5e2 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);