From ac6da721a3740500cc0764947385eb1c22116b83 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 24 May 2014 19:05:12 +0200 Subject: curl_easy_reset: reset the URL Make sure that the URL is reset and cleared. Bug: http://curl.haxx.se/mail/lib-2014-05/0235.html Reported-by: Jonathan Cardoso Machado --- lib/url.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/url.c b/lib/url.c index 7d2592bf9..29222926e 100644 --- a/lib/url.c +++ b/lib/url.c @@ -278,6 +278,11 @@ void Curl_freeset(struct SessionHandle *data) data->change.referer_alloc = FALSE; } data->change.referer = NULL; + if(data->change.url_alloc) { + Curl_safefree(data->change.url); + data->change.url_alloc = FALSE; + } + data->change.url = NULL; } static CURLcode setstropt(char **charp, char *s) -- cgit v1.2.3