]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_parsecfg: use correct free() call to free memory
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Dec 2021 07:45:03 +0000 (08:45 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Dec 2021 10:00:30 +0000 (11:00 +0100)
Detected by Coverity. CID 1494642.
Follow-up from 2be1aa619bca

Closes #8099

src/tool_parsecfg.c

index ba8ac60e24ab5bd8d8e87ba7e1e205ed424f0261..ddb345c6d8168d3fe90876a5aa12cf8a5ef591c9 100644 (file)
@@ -96,7 +96,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
     if(curlrc) {
       file = fopen(curlrc, FOPEN_READTEXT);
       if(!file) {
-        curl_free(curlrc);
+        free(curlrc);
         return 1;
       }
       filename = pathalloc = curlrc;
@@ -285,7 +285,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
   else
     rc = 1; /* couldn't open the file */
 
-  curl_free(pathalloc);
+  free(pathalloc);
   return rc;
 }