mirror of
https://github.com/curl/curl.git
synced 2026-06-23 14:25:37 +03:00
Fixed a memory leak in the new CURLOPT_USERPWD handling
This commit is contained in:
parent
5928ea9c7a
commit
450348d6bd
1 changed files with 1 additions and 0 deletions
|
|
@ -1520,6 +1520,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||
else {
|
||||
memcpy(p, userpwd, username_len);
|
||||
p[username_len] = '\0';
|
||||
Curl_safefree(data->set.str[STRING_USERNAME]);
|
||||
data->set.str[STRING_USERNAME] = p;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue