Fixed a memory leak in the new CURLOPT_USERPWD handling

This commit is contained in:
Dan Fandrich 2008-10-08 20:14:46 +00:00
parent 5928ea9c7a
commit 450348d6bd
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}