diff options
-rw-r--r-- | modutils/lsmod.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modutils/lsmod.c b/modutils/lsmod.c index f2ee19f8f..3d9f700fb 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c | |||
@@ -169,10 +169,7 @@ extern int lsmod_main(int argc, char **argv) | |||
169 | FILE *file; | 169 | FILE *file; |
170 | char line[4096]; | 170 | char line[4096]; |
171 | 171 | ||
172 | file = fopen("/proc/modules", "r"); | 172 | file = bb_xfopen("/proc/modules", "r"); |
173 | |||
174 | if (!file) | ||
175 | bb_error_msg_and_die("Opening /proc/modules"); | ||
176 | 173 | ||
177 | while (fgets(line, sizeof(line), file)) { | 174 | while (fgets(line, sizeof(line), file)) { |
178 | char *tok; | 175 | char *tok; |