use safefree instead
This commit is contained in:
parent
2f17615790
commit
84ed5e755a
10
lib/url.c
10
lib/url.c
@ -2290,15 +2290,13 @@ static CURLcode CreateConnection(struct SessionHandle *data,
|
||||
"%" MAX_CURL_PASSWORD_LENGTH_TXT "[^@]",
|
||||
user, passwd))) {
|
||||
/* found user and password, rip them out */
|
||||
if(conn->proxyuser)
|
||||
free(conn->proxyuser);
|
||||
Curl_safefree(conn->proxyuser);
|
||||
conn->proxyuser = strdup(user);
|
||||
|
||||
if(!conn->proxyuser)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
if(conn->proxypasswd)
|
||||
free(conn->proxypasswd);
|
||||
Curl_safefree(conn->proxypasswd);
|
||||
conn->proxypasswd = strdup(passwd);
|
||||
|
||||
if(!conn->proxypasswd)
|
||||
@ -2882,8 +2880,8 @@ static CURLcode CreateConnection(struct SessionHandle *data,
|
||||
|
||||
free(old_conn->user);
|
||||
free(old_conn->passwd);
|
||||
free(old_conn->proxyuser);
|
||||
free(old_conn->proxypasswd);
|
||||
Curl_safefree(old_conn->proxyuser);
|
||||
Curl_safefree(old_conn->proxypasswd);
|
||||
|
||||
free(old_conn); /* we don't need this anymore */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user