aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-10-08 20:14:46 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-10-08 20:14:46 +0000
commit450348d6bd8a9d0fc22eb53f066443b5d0180113 (patch)
tree765b7d8ae7cb6fd84f31f5703b844f63dad50855
parent5928ea9c7a53d24bba4e37b2e1c33305a37b72f1 (diff)
Fixed a memory leak in the new CURLOPT_USERPWD handling
-rw-r--r--lib/url.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index fe32cba77..cfaab0601 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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;
}