url.c: Fixed memory leak on OOM
authorDan Fandrich <dan@coneharvesters.com>
Mon, 7 Jul 2014 21:12:22 +0000 (23:12 +0200)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 9 Jul 2014 21:55:12 +0000 (23:55 +0200)
This showed itself on some systems with torture failures
in tests 1060 and 1061

lib/url.c

index 27b376f..87ebe00 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -4149,6 +4149,7 @@ static CURLcode setup_connection_internals(struct connectdata *conn)
 void Curl_free_request_state(struct SessionHandle *data)
 {
   Curl_safefree(data->req.protop);
+  Curl_safefree(data->req.newurl);
 }