Skip to content
Snippets Groups Projects
Commit 3313031a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't fclose(errfp) if it's NULL.

parent 5b359484
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2398 failed
......@@ -1296,7 +1296,7 @@ int main(int argc, char **argv, char** env)
err_level=parseLogLevel(p);
break;
case 'e':
if (errfp != stderr)
if (errfp != NULL && errfp != stderr)
fclose(errfp);
if((errfp=fopen(p,omode))==NULL) {
perror(p);
......@@ -1340,7 +1340,7 @@ int main(int argc, char **argv, char** env)
omode="a";
break;
case 'A':
if (errfp != stderr)
if (errfp != NULL && errfp != stderr)
fclose(errfp);
if(*p == '\0') {
errfp = stdout;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment