summaryrefslogtreecommitdiffstats
path: root/Modules/main.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-18 08:53:45 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-18 08:53:45 (GMT)
commit5cc3f26c4809d87a9573783a5ac98212a91c79e1 (patch)
tree9955336a2f7f770ed0c501c5f673d75ab620ed40 /Modules/main.c
parent3e8c897d80db38613f26b2f4c120f9e15a8ae9d2 (diff)
downloadcpython-5cc3f26c4809d87a9573783a5ac98212a91c79e1.zip
cpython-5cc3f26c4809d87a9573783a5ac98212a91c79e1.tar.gz
cpython-5cc3f26c4809d87a9573783a5ac98212a91c79e1.tar.bz2
Coverity CID #168
leaked_storage: Returned without freeing storage "fp"
Diffstat (limited to 'Modules/main.c')
-rw-r--r--Modules/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 3d4b9be..e6409e8 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -565,6 +565,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;
}
}