diff --git a/src/repository.cpp b/src/repository.cpp index e911095..9e122d3 100644 --- a/src/repository.cpp +++ b/src/repository.cpp @@ -256,6 +256,7 @@ Repository::initFromCache( const string& cacheFile ) if ( fgets( input, length, fp ) ) { line = stripWhiteSpace( input ); if ( line != CACHE_VERSION ) { + close( fp ); return FORMAT_ERR; } }