diff options
Diffstat (limited to 'src/comp.c')
-rw-r--r-- | src/comp.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -466,9 +466,15 @@ component_config_commit (void) /* Count available components and allocate array for them */ for (comp = list->head, i = 0; comp; comp = comp->next, i++) - /* FIXME: component_compute_prereq (comp) */; + /* nothing */; - comp_array = grecs_realloc (comp_array, i * sizeof (comp_array[0])); + if (i == 0) + { + free (comp_array); + comp_array = NULL; + } + else + comp_array = grecs_realloc (comp_array, i * sizeof (comp_array[0])); comp_count = i; /* Rearrange components, registering prog entries for the new ones */ |