hal/hald/linux/volume_id volume_id.c,1.3,1.4

David Zeuthen david at pdx.freedesktop.org
Thu May 27 12:13:41 PDT 2004


Update of /cvs/hal/hal/hald/linux/volume_id
In directory pdx:/tmp/cvs-serv27742/hald/linux/volume_id

Modified Files:
	volume_id.c 
Log Message:
2004-05-27  David Zeuthen  <david at fubar.dk>

	* hald/linux/volume_id/volume_id.c (volume_id_open_node): While
	debugging the file descriptor leak that stops cdroms being
	ejected, I noticed a theoretical file descriptor when the box runs
	out of memory. Patch from Crispin Flowerday <gnome at flowerday.cx>

	* hald/linux/block_class_device.c (block_class_accept): Added this
	since 2nd level block devices, e.g. sda1, doesn't have sysdevices
	and the generic class_device_accept was changed to required this.



Index: volume_id.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/volume_id/volume_id.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/volume_id.c	5 May 2004 05:02:30 -0000	1.3
+++ b/volume_id.c	27 May 2004 19:13:39 -0000	1.4
@@ -823,8 +823,10 @@
 		return NULL;
 
 	id = volume_id_open_fd(fd);
-	if (id == NULL)
+	if (id == NULL) {
+		close (fd);
 		return NULL;
+	}
 
 	/* close fd on device close */
 	id->fd_close = 1;





More information about the hal-commit mailing list