Author: pschweitzer Date: Mon Sep 19 07:28:51 2011 New Revision: 53741
URL: http://svn.reactos.org/svn/reactos?rev=53741&view=rev Log: [STUBGEN] Fix resources leak
Modified: trunk/reactos/tools/stubgen.c
Modified: trunk/reactos/tools/stubgen.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/stubgen.c?rev=53741&a... ============================================================================== --- trunk/reactos/tools/stubgen.c [iso-8859-1] (original) +++ trunk/reactos/tools/stubgen.c [iso-8859-1] Mon Sep 19 07:28:51 2011 @@ -34,7 +34,11 @@ int i, libstart = argc; FILE *out = fopen("tests/stubs.tst","w");
- if( argc == 1 ) { usage(argv[0]); return 1; } + if( argc == 1 ) { + if( out ) fclose( out ); + usage(argv[0]); + return 1; + }
if( !out ) { fprintf( stderr, "Could not write file tests/stubs.tst\n" );