mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 20:15:03 -05:00
url: Correction to scope of if statements when setting data
This commit is contained in:
parent
fe880475ed
commit
e99c81a07c
@ -332,19 +332,22 @@ static CURLcode setstropt_userpwd(char *option, char **user_storage,
|
|||||||
(options_storage ? &optionsp : NULL));
|
(options_storage ? &optionsp : NULL));
|
||||||
if(!result) {
|
if(!result) {
|
||||||
/* store username part of option */
|
/* store username part of option */
|
||||||
if(user_storage)
|
if(user_storage) {
|
||||||
Curl_safefree(*user_storage);
|
Curl_safefree(*user_storage);
|
||||||
*user_storage = userp;
|
*user_storage = userp;
|
||||||
|
}
|
||||||
|
|
||||||
/* store password part of option */
|
/* store password part of option */
|
||||||
if(pwd_storage)
|
if(pwd_storage) {
|
||||||
Curl_safefree(*pwd_storage);
|
Curl_safefree(*pwd_storage);
|
||||||
*pwd_storage = passwdp;
|
*pwd_storage = passwdp;
|
||||||
|
}
|
||||||
|
|
||||||
/* store options part of option */
|
/* store options part of option */
|
||||||
if(options_storage)
|
if(options_storage) {
|
||||||
Curl_safefree(*options_storage);
|
Curl_safefree(*options_storage);
|
||||||
*options_storage = optionsp;
|
*options_storage = optionsp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user