burn_drive_free() now closes all open drive file descriptors
This commit is contained in:
parent
20a0c61fd6
commit
f9c21e4057
@ -22,6 +22,8 @@
|
|||||||
static struct burn_drive drive_array[255];
|
static struct burn_drive drive_array[255];
|
||||||
static int drivetop = -1;
|
static int drivetop = -1;
|
||||||
|
|
||||||
|
int burn_drive_is_open(struct burn_drive *d);
|
||||||
|
|
||||||
void burn_drive_free(void)
|
void burn_drive_free(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -29,6 +31,8 @@ void burn_drive_free(void)
|
|||||||
|
|
||||||
for (i = 0; i < drivetop + 1; i++) {
|
for (i = 0; i < drivetop + 1; i++) {
|
||||||
d = &drive_array[i];
|
d = &drive_array[i];
|
||||||
|
if (burn_drive_is_open(d))
|
||||||
|
close(d->fd);
|
||||||
free((void *)d->idata);
|
free((void *)d->idata);
|
||||||
free((void *)d->mdata);
|
free((void *)d->mdata);
|
||||||
free((void *)d->toc_entry);
|
free((void *)d->toc_entry);
|
||||||
|
Loading…
Reference in New Issue
Block a user