aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-02-06 22:59:49 +0100
committerDaniel Stenberg <daniel@haxx.se>2012-02-07 23:07:43 +0100
commitea055407fa45c4247042e7370d463364f03c3136 (patch)
tree1c0297263fe324d6ebd83fe544c09a5967c2c23b /lib
parent4405039fdcc60f6348c8d69159953f18a5c11fed (diff)
curl_easy_reset: reset the referer string
When CURLOPT_REFERER has been used, curl_easy_reset() did not properly clear it. Verified with the new test 598 Bug: http://curl.haxx.se/bug/view.cgi?id=3481551 Reported by: Michael Day
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 466748bfc..395055f4e 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -272,6 +272,12 @@ void Curl_freeset(struct SessionHandle * data)
enum dupstring i;
for(i=(enum dupstring)0; i < STRING_LAST; i++)
Curl_safefree(data->set.str[i]);
+
+ if(data->change.referer_alloc) {
+ Curl_safefree(data->change.referer);
+ data->change.referer_alloc = FALSE;
+ }
+ data->change.referer = NULL;
}
static CURLcode setstropt(char **charp, char * s)