file_systems/cdda: avoid leaking the attributes fd.

* see bug #9528.
This commit is contained in:
Jérôme Duval
2014-07-09 20:54:11 +02:00
parent 0b38b0a136
commit e8f82cdb6e
@@ -738,8 +738,10 @@ Volume::Mount(const char* device)
(const uint8*)toc, B_BENDIAN_TO_HOST_INT16(toc->data_length) + 2);
_RestoreSharedAttributes();
if (fd >= 0)
if (fd >= 0) {
_RestoreAttributes(fd);
close(fd);
}
// determine volume title
DetermineName(fDiscID, fDevice, title, sizeof(title));