svn commit: r198503 - head/usr.sbin/sysinstall

Colin Percival cperciva at FreeBSD.org
Mon Oct 26 23:24:59 UTC 2009


Author: cperciva
Date: Mon Oct 26 23:24:59 2009
New Revision: 198503
URL: http://svn.freebsd.org/changeset/base/198503

Log:
  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

Modified:
  head/usr.sbin/sysinstall/cdrom.c

Modified: head/usr.sbin/sysinstall/cdrom.c
==============================================================================
--- head/usr.sbin/sysinstall/cdrom.c	Mon Oct 26 22:00:26 2009	(r198502)
+++ head/usr.sbin/sysinstall/cdrom.c	Mon Oct 26 23:24:59 2009	(r198503)
@@ -239,5 +239,6 @@ mediaEjectCDROM(Device *dev)
 	else {
 		ioctl(fd, CDIOCALLOW);
 		ioctl(fd, CDIOCEJECT);
+		close(fd);
 	}
 }


More information about the svn-src-all mailing list