aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-05-24 19:05:12 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-05-24 19:06:11 +0200
commitac6da721a3740500cc0764947385eb1c22116b83 (patch)
tree220b8b3c92705c6692f4faf6c8bed4988c6b0be2
parentb3d0e4e24385c88857463c7ecd6693fbb7a54d37 (diff)
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
-rw-r--r--lib/url.c5
1 files changed, 5 insertions, 0 deletions
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)