[patch] fd leak fix for {pci,id} reading
Sjoerd Simons
sjoerd at luon.net
Thu Oct 7 07:30:47 PDT 2004
Hi,
The {pci, usb} id database read functions never close the file descriptors.
bad. Fixed in attached patch
Sjoerd
--
Paradise is exactly like where you are right now ... only much, much better.
-- Laurie Anderson
-------------- next part --------------
Index: hald/linux/pci_bus_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/pci_bus_device.c,v
retrieving revision 1.7
diff -u -r1.7 pci_bus_device.c
--- hald/linux/pci_bus_device.c 5 Jul 2004 18:21:07 -0000 1.7
+++ hald/linux/pci_bus_device.c 7 Oct 2004 14:29:16 -0000
@@ -302,9 +302,11 @@
HAL_ERROR (("Error loading PCI database file\n"));
free (pci_ids);
pci_ids = NULL;
+ fclose(fp);
return FALSE;
}
+ fclose(fp);
return TRUE;
}
-------------- next part --------------
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list