mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
tool_parsecfg: use correct free() call to free memory
Detected by Coverity. CID 1494642.
Follow-up from 2be1aa619b
Closes #8099
This commit is contained in:
parent
75b31ce626
commit
bc064a8177
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user