summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-12-06 08:45:03 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-12-06 11:00:30 +0100
commitbc064a8177f14fd69a6bcd7735b19ab84f3ba81d (patch)
tree2197100977a82975b082d7d0942d0e1e41773be9
parent75b31ce6267e42416a5a27fd1cf4eea60c420cb7 (diff)
downloadcurl-bc064a8177f14fd69a6bcd7735b19ab84f3ba81d.tar.gz
tool_parsecfg: use correct free() call to free memory
Detected by Coverity. CID 1494642. Follow-up from 2be1aa619bca Closes #8099
-rw-r--r--src/tool_parsecfg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index ba8ac60e2..ddb345c6d 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -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;
}