From 207ec3a836dcb63be61bbbc607a8cda3ffe0206d Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Mon, 26 Oct 2009 23:24:59 +0000 Subject: [PATCH] Don't leak a file descriptor when ejecting a CDROM. Submitted by: Ronald Klop, trhodes Note to self: don't do commits while half-asleep --- usr.sbin/sysinstall/cdrom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/sysinstall/cdrom.c b/usr.sbin/sysinstall/cdrom.c index 07a372237a36..6bc72d863ef9 100644 --- a/usr.sbin/sysinstall/cdrom.c +++ b/usr.sbin/sysinstall/cdrom.c @@ -239,5 +239,6 @@ mediaEjectCDROM(Device *dev) else { ioctl(fd, CDIOCALLOW); ioctl(fd, CDIOCEJECT); + close(fd); } }