From f9c21e4057d19da90db1c6069493b2293cd00fb3 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 25 Aug 2006 17:02:27 +0000 Subject: [PATCH] burn_drive_free() now closes all open drive file descriptors --- libburn/drive.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libburn/drive.c b/libburn/drive.c index 191fcc5..1f0fb6a 100644 --- a/libburn/drive.c +++ b/libburn/drive.c @@ -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);