mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Fix Coverity 168: Close the file before returning (exiting).
This commit is contained in:
parent
088beae1f2
commit
e545ff30a6
1 changed files with 1 additions and 0 deletions
|
@ -416,6 +416,7 @@ Py_Main(int argc, char **argv)
|
||||||
if (fstat(fileno(fp), &sb) == 0 &&
|
if (fstat(fileno(fp), &sb) == 0 &&
|
||||||
S_ISDIR(sb.st_mode)) {
|
S_ISDIR(sb.st_mode)) {
|
||||||
fprintf(stderr, "%s: '%s' is a directory, cannot continue\n", argv[0], filename);
|
fprintf(stderr, "%s: '%s' is a directory, cannot continue\n", argv[0], filename);
|
||||||
|
fclose(fp);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue