From e545ff30a629f9d41a15c409ed9780eaf505b329 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Fri, 12 Oct 2007 03:03:23 +0000 Subject: Fix Coverity 168: Close the file before returning (exiting). --- Modules/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/main.c b/Modules/main.c index 59b0e9f..417b3f2 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -416,6 +416,7 @@ Py_Main(int argc, char **argv) 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; } } -- cgit v0.12