diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2007-01-25 01:35:43 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2007-01-25 01:35:43 +0000 |
commit | 44ac2776ae8394974c88655c8c45ee4a6bf7b209 (patch) | |
tree | 391374bc62df04392e41426a0c4f01cac0f5a630 /lib/url.c | |
parent | 36e3e6ed16876c282268e808b48618b94cca09c4 (diff) |
Fixed a dangling pointer problem that prevented the http_proxy environment
variable from being properly used in many cases (and caused test case 63
to fail).
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -3380,12 +3380,13 @@ else { conn->proxy.name = conn->proxy.rawalloc; free(proxydup); /* free the duplicate pointer and not the modified */ + proxy = NULL; /* this may have just been freed */ if(!conn->proxy.rawalloc) return CURLE_OUT_OF_MEMORY; } /************************************************************* - * If the protcol is using SSL and HTTP proxy is used, we set + * If the protocol is using SSL and HTTP proxy is used, we set * the tunnel_proxy bit. *************************************************************/ if((conn->protocol&PROT_SSL) && conn->bits.httpproxy) @@ -3831,7 +3832,7 @@ else { /* set a pointer to the hostname we display */ fix_hostname(data, conn, &conn->host); - if(!proxy || !*proxy) { + if(!conn->proxy.name || !*conn->proxy.name) { /* If not connecting via a proxy, extract the port from the URL, if it is * there, thus overriding any defaults that might have been set above. */ conn->port = conn->remote_port; /* it is the same port */ |