1
0
Fork 0
forked from len0rd/rockbox

[coverity] playlist.c pl_save_update_control() close fd on error

Change-Id: Ib44e86a36540e65a15eed3e9b99106734379250d
This commit is contained in:
William Wilgus 2024-06-02 22:14:27 -04:00
parent 283f31dd39
commit afba86f0f7

View file

@ -3931,7 +3931,10 @@ static int pl_save_update_control(struct playlist_info* playlist,
playlist->filename[playlist->dirlen-1] = c; playlist->filename[playlist->dirlen-1] = c;
if (err <= 0) if (err <= 0)
{
close(old_fd);
return -4; return -4;
}
if (playlist->first_index > 0) if (playlist->first_index > 0)
{ {