diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-09-18 16:21:36 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-09-18 16:21:36 +0000 |
commit | 316188856741a4379ee5e4b9ab31ebcc3bfb7593 (patch) | |
tree | a63edef2aa8b7a41352e9514c7e6ff5b99f9683a /mdk-stage1/probing.c | |
parent | 4d487752eea5b9dc15a581de1a5745ed868fcc1b (diff) | |
download | drakx-backup-do-not-use-316188856741a4379ee5e4b9ab31ebcc3bfb7593.tar drakx-backup-do-not-use-316188856741a4379ee5e4b9ab31ebcc3bfb7593.tar.gz drakx-backup-do-not-use-316188856741a4379ee5e4b9ab31ebcc3bfb7593.tar.bz2 drakx-backup-do-not-use-316188856741a4379ee5e4b9ab31ebcc3bfb7593.tar.xz drakx-backup-do-not-use-316188856741a4379ee5e4b9ab31ebcc3bfb7593.zip |
close file descriptors
Diffstat (limited to 'mdk-stage1/probing.c')
-rw-r--r-- | mdk-stage1/probing.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c index 3fc80db51..4a1b9a0dc 100644 --- a/mdk-stage1/probing.c +++ b/mdk-stage1/probing.c @@ -163,7 +163,7 @@ void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((u { /* ---- PCI probe ---------------------------------------------- */ { - FILE * f; + FILE * f = NULL; unsigned int len = 0; unsigned int len_full = 0; char buf[200]; @@ -265,8 +265,9 @@ void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((u } next_pci_device:; } - fclose(f); end_pci_probe:; + if (f) + fclose(f); } @@ -276,7 +277,7 @@ void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((u static int already_probed_usb_controllers = 0; static int already_mounted_usbdev = 0; - FILE * f; + FILE * f = NULL; int len = 0; char buf[200]; struct usb_module_map * usbdb = NULL; @@ -340,8 +341,9 @@ void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((u } } } - fclose(f); end_usb_probe:; + if (f) + fclose(f); } #endif } |