diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-05-29 23:07:22 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-05-29 23:07:22 +0000 |
commit | 6d522c9c1dae070f73aae1022b09b68f9153959e (patch) | |
tree | e8d3b26169fb00fff416efd01a353a5b079e908a /lib/url.c | |
parent | 45885f30c2753c66cff34f2e80ac26dcc8cfae75 (diff) |
made getenv() more threadsafe for win32
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 ) { |