[Python-checkins] r58422 - python/trunk/Modules/main.c
neal.norwitz
python-checkins at python.org
Fri Oct 12 05:03:23 CEST 2007
Author: neal.norwitz
Date: Fri Oct 12 05:03:23 2007
New Revision: 58422
Modified:
python/trunk/Modules/main.c
Log:
Fix Coverity 168: Close the file before returning (exiting).
Modified: python/trunk/Modules/main.c
==============================================================================
--- python/trunk/Modules/main.c (original)
+++ python/trunk/Modules/main.c Fri Oct 12 05:03:23 2007
@@ -416,6 +416,7 @@
if (fstat(fileno(fp), &sb) == 0 &&
S_ISDIR(sb.st_mode)) {
fprintf(stderr, "%s: '%s' is a directory, cannot continue\n", argv[0], filename);
+ fclose(fp);
return 1;
}
}
More information about the Python-checkins
mailing list