summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--hald/linux/linux_class_block.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f56cacf2..1a965379 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-14 David Zeuthen <david@fubar.dk>
+
+ * hald/linux/linux_class_block.c (detect_media): Doh, leaked a
+ filedescriptor which is big trouble. Fixed
+
2004-01-13 David Zeuthen <david@fubar.dk>
* configure.in: Bump version number to 0.2.4
diff --git a/hald/linux/linux_class_block.c b/hald/linux/linux_class_block.c
index 77755a05..c590fbc6 100644
--- a/hald/linux/linux_class_block.c
+++ b/hald/linux/linux_class_block.c
@@ -1049,6 +1049,7 @@ static dbus_bool_t detect_media(HalDevice* d)
return FALSE;
}
+
/* got a disc in drive, */
/* disc in drive; check if the HAL device representing
@@ -1056,6 +1057,8 @@ static dbus_bool_t detect_media(HalDevice* d)
* only one child)
*/
+ close(fd);
+
child = ds_device_find_by_key_value_string("info.parent",
d->udi,
TRUE);
@@ -1097,6 +1100,8 @@ static dbus_bool_t detect_media(HalDevice* d)
}
} /* if( is optical drive ) */
+
+ close(fd);
return FALSE;
}