hal/hald/linux usb_bus_device.c,1.14,1.15
David Zeuthen
david at freedesktop.org
Thu Oct 14 11:51:14 PDT 2004
Update of /cvs/hal/hal/hald/linux
In directory gabe:/tmp/cvs-serv22710/hald/linux
Modified Files:
usb_bus_device.c
Log Message:
2004-10-14 David Zeuthen <davidz at redhat.com>
Patch from Sjoerd Simons <sjoerd at luon.net>.
* hald/linux/usb_bus_device.c (usb_ids_load): The usb id database
read functions never close the file descriptors. bad. Fixed in
attached patch.
Index: usb_bus_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/usb_bus_device.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- usb_bus_device.c 20 Sep 2004 18:31:15 -0000 1.14
+++ usb_bus_device.c 14 Oct 2004 18:51:12 -0000 1.15
@@ -237,6 +237,7 @@
printf
("Couldn't allocate %d bytes for USB database file\n",
usb_ids_len);
+ fclose(fp);
return FALSE;
}
@@ -245,9 +246,11 @@
printf ("Error loading USB database file\n");
free (usb_ids);
usb_ids = NULL;
+ fclose(fp);
return FALSE;
}
+ fclose(fp);
return TRUE;
}
More information about the hal-commit
mailing list