it's better to close file and return on non-void function
[xonotic/netradiant.git] / tools / quake3 / common / vfs.c
index 16a7828..4e38c94 100644 (file)
@@ -316,6 +316,7 @@ int vfsLoadFile( const char *filename, void **bufferptr, int index ){
 
                f = fopen( filename, "rb" );
                if ( f == NULL ) {
+                       fclose( f );
                        return -1;
                }