http: store the password in the correct variable

Typo from fc2f1e547a, detected by Coverity (because there's dead code
due to this).

Closes #11002
This commit is contained in:
Daniel Stenberg 2023-04-19 08:23:19 +02:00
parent 20252b77bc
commit 406cc24f5d
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -4606,7 +4606,7 @@ static CURLcode req_assign_url_authority(struct http_req *req, CURLU *url)
if(uc && uc != CURLUE_NO_USER)
goto out;
if(user) {
uc = curl_url_get(url, CURLUPART_PASSWORD, &user, 0);
uc = curl_url_get(url, CURLUPART_PASSWORD, &pass, 0);
if(uc && uc != CURLUE_NO_PASSWORD)
goto out;
}