CHANGE LIB-SRC: make FLAC export error-check the closing of files

This commit is contained in:
Paul Licameli 2018-01-22 16:01:54 -05:00
parent 07bf088565
commit b3b4ace739
1 changed files with 2 additions and 1 deletions

View File

@ -1469,7 +1469,8 @@ FLAC_API FLAC__bool FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder)
if(0 != encoder->private_->file) {
if(encoder->private_->file != stdout)
fclose(encoder->private_->file);
error = fflush(encoder->private_->file) ||
fclose(encoder->private_->file);
encoder->private_->file = 0;
}