flac: Fix fd leak on bad FLAC files.
Some types of bad FLAC files error out early in the metadata parsing phase, and we weren't properly deleting the iterator if it errored out at that point.
This commit is contained in:
parent
e4dab2455b
commit
0da13b33f0
@ -37,8 +37,9 @@ _get_flctags(char *filename, struct song_metadata *psong)
|
||||
|
||||
if(!FLAC__metadata_simple_iterator_init(iterator, filename, true, true))
|
||||
{
|
||||
DPRINTF(E_ERROR, L_SCANNER, "Cannot extract tag from %s\n", filename);
|
||||
return -1;
|
||||
DPRINTF(E_ERROR, L_SCANNER, "Cannot extract tag from %s [%s]\n", filename,
|
||||
FLAC__Metadata_SimpleIteratorStatusString[FLAC__metadata_simple_iterator_status(iterator)]);
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
do {
|
||||
|
Loading…
x
Reference in New Issue
Block a user