From bc064a8177f14fd69a6bcd7735b19ab84f3ba81d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 6 Dec 2021 08:45:03 +0100 Subject: tool_parsecfg: use correct free() call to free memory Detected by Coverity. CID 1494642. Follow-up from 2be1aa619bca Closes #8099 --- src/tool_parsecfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.1