gnunet-svn
[Top][All Lists]
Advanced

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

[gnurl] 05/18: curl/parseconfig: use curl_free() to free memory allocate


From: gnunet
Subject: [gnurl] 05/18: curl/parseconfig: use curl_free() to free memory allocated by libcurl
Date: Fri, 20 Dec 2019 14:49:07 +0100

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 23e4d98e7e0e01e79cd39361b23495dfeac4e4c4
Author: Daniel Stenberg <address@hidden>
AuthorDate: Wed Dec 18 13:43:50 2019 +0100

    curl/parseconfig: use curl_free() to free memory allocated by libcurl
    
    Reported-by: bxac on github
    Fixes #4730
    Closes #4731
---
 src/tool_parsecfg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index 208897f48..a9057ea31 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -98,7 +98,7 @@ int parseconfig(const char *filename, struct GlobalConfig 
*global)
       char prefix = '.';
       do {
         /* if it was allocated in a previous attempt */
-        free(pathalloc);
+        curl_free(pathalloc);
         /* check for .curlrc then _curlrc in the home dir */
         pathalloc = curl_maprintf("%s%s%ccurlrc", home, DIR_CHAR, prefix);
         if(!pathalloc) {
@@ -287,7 +287,7 @@ int parseconfig(const char *filename, struct GlobalConfig 
*global)
   else
     rc = 1; /* couldn't open the file */
 
-  free(pathalloc);
+  curl_free(pathalloc);
   return rc;
 }
 

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



reply via email to

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