diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-09-28 20:00:24 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-09-28 20:00:24 +0000 |
commit | cbf3b3e73122b641982a53721c0f32318e50e423 (patch) | |
tree | d08e1db46be15de6379d2278d71221ebd19d93dc | |
parent | 2131f0e8d5c66cc6a2de68d01ce4977cb54451bd (diff) | |
download | ldetect-cbf3b3e73122b641982a53721c0f32318e50e423.tar ldetect-cbf3b3e73122b641982a53721c0f32318e50e423.tar.gz ldetect-cbf3b3e73122b641982a53721c0f32318e50e423.tar.bz2 ldetect-cbf3b3e73122b641982a53721c0f32318e50e423.tar.xz ldetect-cbf3b3e73122b641982a53721c0f32318e50e423.zip |
fix modalias fd leak (thanks to Anssi for the report)
-rw-r--r-- | pciusb.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -54,8 +54,10 @@ static void find_modules_through_aliases(struct pciusb_entries *entries) { size_t n, size; if (-1 == getline(&modalias, &n, file)) { fprintf(stderr, "Unable to read modalias from %s\n", modalias_path); + fclose(file); return; } + fclose(file); size = strlen(modalias); if (size) modalias[size-1] = 0; |