Skip to content

Commit

Permalink
fix(radio): close file handle if sound file cannot be played (#5159)
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz authored Jun 11, 2024
1 parent 61a52b8 commit 993f271
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions radio/src/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ int WavContext::mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade)
}

if (result != FR_OK) {
f_close(&state.file);
clear();
}
return 0;
Expand Down

0 comments on commit 993f271

Please sign in to comment.