diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/bmp_impl.h b/CGAL_ImageIO/src/CGAL_ImageIO/bmp_impl.h index 155f38d939f..3b9bdd0c1e4 100644 --- a/CGAL_ImageIO/src/CGAL_ImageIO/bmp_impl.h +++ b/CGAL_ImageIO/src/CGAL_ImageIO/bmp_impl.h @@ -135,6 +135,7 @@ void *_readBmpImage( const char *name, filePos = ftell(fp); rc = readUINT16little(fp, &fileType); if (rc != 0) { + fclose(fp); if ( get_static_verbose_bmp() ) fprintf( stderr, "%s: error in getting file type %s\n", proc, name ); return( (void*)NULL );