gnunet-svn
[Top][All Lists]
Advanced

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

[gnurl] 15/29: curl: cleanup multi handle on failure


From: gnunet
Subject: [gnurl] 15/29: curl: cleanup multi handle on failure
Date: Fri, 10 Jan 2020 23:05:53 +0100

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 271ec6b9b6276499b9e45083611e1d08d951b59a
Author: Daniel Stenberg <address@hidden>
AuthorDate: Sat Jan 4 16:27:56 2020 +0100

    curl: cleanup multi handle on failure
    
    ... to fix memory leak in error path.
    
    Fixes #4772
    Closes #4780
    Reported-by: Brian Carpenter
---
 src/tool_operate.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/tool_operate.c b/src/tool_operate.c
index 61b130672..9dc59b2e9 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <address@hidden>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -2105,8 +2105,10 @@ static CURLcode parallel_transfers(struct GlobalConfig 
*global,
 
   result = add_parallel_transfers(global, multi, share,
                                   &more_transfers, &added_transfers);
-  if(result)
+  if(result) {
+    curl_multi_cleanup(multi);
     return result;
+  }
 
   while(!mcode && (still_running || more_transfers)) {
     mcode = curl_multi_poll(multi, NULL, 0, 1000, NULL);

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



reply via email to

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