aboutsummaryrefslogtreecommitdiff
path: root/modutils/lsmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'modutils/lsmod.c')
-rw-r--r--modutils/lsmod.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index ac1cded2b..2bf4afbe9 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -147,9 +147,8 @@ int lsmod_main(int argc, char **argv)
147 check_tainted(); 147 check_tainted();
148#if defined(CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT) 148#if defined(CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT)
149 { 149 {
150 char line[4096]; 150 char *line;
151 151 while ((line = xmalloc_fgets(file)) != NULL) {
152 while (fgets(line, sizeof(line), file)) {
153 char *tok; 152 char *tok;
154 153
155 tok = strtok(line, " \t"); 154 tok = strtok(line, " \t");
@@ -175,7 +174,8 @@ int lsmod_main(int argc, char **argv)
175 tok = ""; 174 tok = "";
176 printf(" %s", tok); 175 printf(" %s", tok);
177 } 176 }
178 printf("\n"); 177 puts("");
178 free(line);
179 } 179 }
180 fclose(file); 180 fclose(file);
181 } 181 }