gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 26/178: CURLINFO_COOKIELIST.3: made the example not


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 26/178: CURLINFO_COOKIELIST.3: made the example not leak memory
Date: Wed, 23 May 2018 12:24:21 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 27d7e511d5db558273a1e9fcd8658918f5b77d62
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Mar 20 23:18:23 2018 +0100

    CURLINFO_COOKIELIST.3: made the example not leak memory
    
    Reported-by: Muz Dima
---
 docs/libcurl/opts/CURLINFO_COOKIELIST.3 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/docs/libcurl/opts/CURLINFO_COOKIELIST.3 
b/docs/libcurl/opts/CURLINFO_COOKIELIST.3
index 18203dba7..a20489064 100644
--- a/docs/libcurl/opts/CURLINFO_COOKIELIST.3
+++ b/docs/libcurl/opts/CURLINFO_COOKIELIST.3
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+.\" * Copyright (C) 1998 - 2018, 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
@@ -56,9 +56,10 @@ if(curl) {
     res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
     if(!res && cookies) {
       /* a linked list of cookies in cookie file format */
-      while(cookies) {
-        printf("%s", cookies->data);
-        cookies = cookies->next;
+      struct curl_slist *each = cookies;
+      while(each) {
+        printf("%s", each->data);
+        each = each->next;
       }
       /* we must free these cookies when we're done */
       curl_slist_free_all(cookies);

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



reply via email to

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