plugins: vbrfix: Fix fd leak & error handling
- mp3info returns true for error - fd wasn't closed for non-vbr files Change-Id: I5432025d3384ddf92ed0a478587dcc1715fcf524
This commit is contained in:
parent
2456d28e21
commit
287747591e
1 changed files with 3 additions and 1 deletions
|
@ -150,7 +150,7 @@ static bool vbr_fix(const char *selected_file)
|
||||||
xingupdate(0);
|
xingupdate(0);
|
||||||
|
|
||||||
rc = rb->mp3info(&entry, selected_file);
|
rc = rb->mp3info(&entry, selected_file);
|
||||||
if(rc < 0) {
|
if(rc) {
|
||||||
fileerror(rc);
|
fileerror(rc);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -258,6 +258,8 @@ static bool vbr_fix(const char *selected_file)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
rb->close(fd);
|
||||||
|
|
||||||
/* Not a VBR file */
|
/* Not a VBR file */
|
||||||
DEBUGF("Not a VBR file\n");
|
DEBUGF("Not a VBR file\n");
|
||||||
rb->splash(HZ*2, ID2P(LANG_NOT_A_VBR_FILE));
|
rb->splash(HZ*2, ID2P(LANG_NOT_A_VBR_FILE));
|
||||||
|
|
Loading…
Reference in a new issue