diff options
author | Daniel Stenberg <daniel@haxx.se> | 2012-02-06 22:59:49 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-02-07 23:07:43 +0100 |
commit | ea055407fa45c4247042e7370d463364f03c3136 (patch) | |
tree | 1c0297263fe324d6ebd83fe544c09a5967c2c23b /lib | |
parent | 4405039fdcc60f6348c8d69159953f18a5c11fed (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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |