gnunet-svn
[Top][All Lists]
Advanced

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

[gnurl] 132/151: multi: free sockhash on OOM


From: gnunet
Subject: [gnurl] 132/151: multi: free sockhash on OOM
Date: Fri, 20 Dec 2019 14:27:21 +0100

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 29ca9fc596c808c0ea716681af4743914f4003f5
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Dec 13 17:45:21 2019 +0100

    multi: free sockhash on OOM
    
    This would otherwise leak memory in the error path.
    
    Detected by torture test 1540.
    
    Closes #4713
---
 lib/multi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/multi.c b/lib/multi.c
index cc11ea617..6d819b4aa 100755
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -260,6 +260,7 @@ static struct Curl_sh_entry *sh_addentry(struct curl_hash 
*sh,
 
   /* make/add new hash entry */
   if(!Curl_hash_add(sh, (char *)&s, sizeof(curl_socket_t), check)) {
+    Curl_hash_destroy(&check->transfers);
     free(check);
     return NULL; /* major failure */
   }

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



reply via email to

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