aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-08-11 12:30:21 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-08-11 12:30:21 +0000
commit84ed5e755ab1e16f0d7a9923e7f63b8337128960 (patch)
treeaa466e41f8ed2f3d1b05328004d53721f1141651 /lib
parent2f1761579092d933aa3aba7059e025436d8b3b30 (diff)
use safefree instead
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/url.c b/lib/url.c
index 9fd1ce576..76331aac9 100644
--- a/lib/url.c
+++ b/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 */