diff options
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r-- | modutils/modprobe.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 3ac5a81a5..1a4f5d4d4 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -482,10 +482,8 @@ static struct dep_t *build_dep(void) | |||
482 | dep = xstrndup(deps, next - deps - ext + 1); | 482 | dep = xstrndup(deps, next - deps - ext + 1); |
483 | 483 | ||
484 | /* Add the new dependable module name */ | 484 | /* Add the new dependable module name */ |
485 | current->m_depcnt++; | 485 | current->m_deparr = xrealloc_vector(current->m_deparr, 2, current->m_depcnt); |
486 | current->m_deparr = xrealloc(current->m_deparr, | 486 | current->m_deparr[current->m_depcnt++] = dep; |
487 | sizeof(char *) * current->m_depcnt); | ||
488 | current->m_deparr[current->m_depcnt - 1] = dep; | ||
489 | 487 | ||
490 | p = next + 2; | 488 | p = next + 2; |
491 | } while (next < end); | 489 | } while (next < end); |