commit - bf0e053b373293efee73f08763a50a9d4ec0f5f3
commit + 9491bb715d868c641ea2de62134ea28e37e58b51
blob - 31e9f32007eaba2a685339fcb5aff91596aa5bf0
blob + fde8ecfc1914f6f84451f491ebf27511d482d507
--- player_flac.c
+++ player_flac.c
}
FLAC__stream_decoder_delete(decoder);
+
+ fclose(f);
}
blob - 22df939c86a81584737f7e3e162c8ccc9aac5717
blob + dde2aa7fba32e8e424d29c03237ab99aa53adb95
--- player_mad.c
+++ player_mad.c
if (fstat(fd, &stat) == -1) {
log_warn("fstat");
- return;
+ goto end;
}
m = mmap(NULL, stat.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (m == MAP_FAILED) {
log_warn("map failed");
- return;
+ goto end;
}
decode(m, stat.st_size);
munmap(m, stat.st_size);
+
+end:
+ close(fd);
}
blob - 4f87ae3595c91d7db437efa7d7980af703af2b6d
blob + 8028a6b40924aa0687192a18b6a338724f085c0e
--- player_oggvorbis.c
+++ player_oggvorbis.c
}
ov_clear(&vf);
+ fclose(f);
}