aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-05-29 23:07:22 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-05-29 23:07:22 +0000
commit6d522c9c1dae070f73aae1022b09b68f9153959e (patch)
treee8d3b26169fb00fff416efd01a353a5b079e908a /lib/url.c
parent45885f30c2753c66cff34f2e80ac26dcc8cfae75 (diff)
made getenv() more threadsafe for win32
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 5dd33a59d..8c48d0512 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -172,6 +172,12 @@ void urlfree(struct UrlData *data, bool totally)
data->firstsocket=-1;
}
+ if(data->bits.proxystringalloc) {
+ data->bits.proxystringalloc=0;
+ free(data->proxy);
+ data->proxy=NULL;
+ }
+
if(data->ptr_proxyuserpwd) {
free(data->ptr_proxyuserpwd);
@@ -815,10 +821,13 @@ CURLcode curl_connect(CURL *curl, CURLconnect **in_connect)
if(proxy && *proxy) {
/* we have a proxy here to set */
data->proxy = proxy;
+ data->bits.proxystringalloc=1; /* this needs to be freed later */
data->bits.httpproxy=1;
}
} /* if (!nope) - it wasn't specfied non-proxy */
} /* NO_PROXY wasn't specified or '*' */
+ if(no_proxy)
+ free(no_proxy);
} /* if not using proxy */
if((conn->protocol&PROT_MISSING) && data->bits.httpproxy ) {