diff options
Diffstat (limited to 'modutils')
-rw-r--r-- | modutils/modprobe-small.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index 0d78033c3..bbd700eb7 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
@@ -314,6 +314,7 @@ static int load_dep_bb(void) | |||
314 | 314 | ||
315 | while ((line = xmalloc_fgetline(fp)) != NULL) { | 315 | while ((line = xmalloc_fgetline(fp)) != NULL) { |
316 | char* space; | 316 | char* space; |
317 | char* linebuf; | ||
317 | int cur; | 318 | int cur; |
318 | 319 | ||
319 | if (!line[0]) { | 320 | if (!line[0]) { |
@@ -328,7 +329,8 @@ static int load_dep_bb(void) | |||
328 | if (*space) | 329 | if (*space) |
329 | *space++ = '\0'; | 330 | *space++ = '\0'; |
330 | modinfo[cur].aliases = space; | 331 | modinfo[cur].aliases = space; |
331 | modinfo[cur].deps = xmalloc_fgetline(fp) ? : xzalloc(1); | 332 | linebuf = xmalloc_fgetline(fp); |
333 | modinfo[cur].deps = linebuf ? linebuf : xzalloc(1); | ||
332 | if (modinfo[cur].deps[0]) { | 334 | if (modinfo[cur].deps[0]) { |
333 | /* deps are not "", so next line must be empty */ | 335 | /* deps are not "", so next line must be empty */ |
334 | line = xmalloc_fgetline(fp); | 336 | line = xmalloc_fgetline(fp); |