gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 60/219: url: always clone the CUROPT_CURLU handle


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 60/219: url: always clone the CUROPT_CURLU handle
Date: Wed, 22 May 2019 19:16:39 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 9a4ad1b0567ec66876f853f2127ceaa799394bcf
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Apr 11 12:49:20 2019 +0200

    url: always clone the CUROPT_CURLU handle
    
    Since a few code paths actually update that data.
    
    Fixes #3753
    Closes #3761
    
    Reported-by: Poul T Lomholt
---
 lib/url.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/url.c b/lib/url.c
index e5a78a6de..75de68f3c 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -303,8 +303,7 @@ static void up_free(struct Curl_easy *data)
   Curl_safefree(up->options);
   Curl_safefree(up->path);
   Curl_safefree(up->query);
-  if(data->set.uh != data->state.uh)
-    curl_url_cleanup(data->state.uh);
+  curl_url_cleanup(data->state.uh);
   data->state.uh = NULL;
 }
 
@@ -1879,7 +1878,7 @@ static CURLcode parseurlandfillconn(struct Curl_easy 
*data,
 
   /* parse the URL */
   if(data->set.uh) {
-    uh = data->state.uh = data->set.uh;
+    uh = data->state.uh = curl_url_dup(data->set.uh);
   }
   else {
     uh = data->state.uh = curl_url();

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]