]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
url: enumerated type mixed with another type
authorDaniel Stenberg <daniel@haxx.se>
Wed, 20 Jul 2022 21:24:17 +0000 (23:24 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 23 Jul 2022 11:39:06 +0000 (13:39 +0200)
Follow-up to 1c58e7ae99ce2030213f28b

Closes #9179

lib/url.c

index 7e9924d2594df4df81747097550326955edade77..426528fb5e8c7092d8aca3e24f4660b36d4fd196 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2735,16 +2735,16 @@ static CURLcode create_conn_helper_init_proxy(struct Curl_easy *data,
    * connection that may exist registered to the same proxy host.
    ***********************************************************************/
   if(proxy || socksproxy) {
+    curl_proxytype ptype = (curl_proxytype)conn->http_proxy.proxytype;
     if(proxy) {
-      result = parse_proxy(data, conn, proxy, conn->http_proxy.proxytype);
+      result = parse_proxy(data, conn, proxy, ptype);
       Curl_safefree(proxy); /* parse_proxy copies the proxy string */
       if(result)
         goto out;
     }
 
     if(socksproxy) {
-      result = parse_proxy(data, conn, socksproxy,
-                           conn->socks_proxy.proxytype);
+      result = parse_proxy(data, conn, socksproxy, ptype);
       /* parse_proxy copies the socks proxy string */
       Curl_safefree(socksproxy);
       if(result)