From: Christian Heimes Date: Fri, 18 Jan 2008 08:53:45 +0000 (+0000) Subject: Coverity CID #168 X-Git-Tag: v2.6a1~562 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5cc3f26c4809d87a9573783a5ac98212a91c79e1;p=thirdparty%2FPython%2Fcpython.git Coverity CID #168 leaked_storage: Returned without freeing storage "fp" --- diff --git a/Modules/main.c b/Modules/main.c index 3d4b9bed8c8d..e6409e84a26e 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; } }