aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modutils/lsmod.c5
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)
FILE *file;
char line[4096];
- file = fopen("/proc/modules", "r");
-
- if (!file)
- bb_error_msg_and_die("Opening /proc/modules");
+ file = bb_xfopen("/proc/modules", "r");
while (fgets(line, sizeof(line), file)) {
char *tok;