gnunet-svn
[Top][All Lists]
Advanced

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

[gnurl] 121/151: lib1559: fix mem-leak in OOM


From: gnunet
Subject: [gnurl] 121/151: lib1559: fix mem-leak in OOM
Date: Fri, 20 Dec 2019 14:27:10 +0100

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 197d8aaf6db97db8ae06ccee828e7d6c46a22f4e
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Dec 12 15:10:47 2019 +0100

    lib1559: fix mem-leak in OOM
    
    Closes #4709
---
 tests/libtest/lib1559.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/tests/libtest/lib1559.c b/tests/libtest/lib1559.c
index 2aa3615e0..e1b417548 100644
--- a/tests/libtest/lib1559.c
+++ b/tests/libtest/lib1559.c
@@ -34,6 +34,9 @@ int test(char *URL)
   CURLU *u;
   (void)URL;
 
+  if(!longurl)
+    return 1;
+
   memset(longurl, 'a', EXCESSIVE);
   longurl[EXCESSIVE-1] = 0;
 
@@ -62,15 +65,8 @@ int test(char *URL)
     curl_url_cleanup(u);
   }
 
-  free(longurl);
-
-  curl_easy_cleanup(curl);
-  curl_global_cleanup();
-
-  return 0;
-
 test_cleanup:
-
+  free(longurl);
   curl_easy_cleanup(curl);
   curl_global_cleanup();
 

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



reply via email to

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