From 6d522c9c1dae070f73aae1022b09b68f9153959e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 29 May 2000 23:07:22 +0000 Subject: made getenv() more threadsafe for win32 --- lib/url.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/url.c') 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 ) { -- cgit v1.2.3