burn_drive_free() now closes all open drive file descriptors

This commit is contained in:
Thomas Schmitt 2006-08-25 17:02:27 +00:00
parent 20a0c61fd6
commit f9c21e4057

View File

@ -22,6 +22,8 @@
static struct burn_drive drive_array[255];
static int drivetop = -1;
int burn_drive_is_open(struct burn_drive *d);
void burn_drive_free(void)
{
int i;
@ -29,6 +31,8 @@ void burn_drive_free(void)
for (i = 0; i < drivetop + 1; i++) {
d = &drive_array[i];
if (burn_drive_is_open(d))
close(d->fd);
free((void *)d->idata);
free((void *)d->mdata);
free((void *)d->toc_entry);