aboutsummaryrefslogtreecommitdiff
path: root/networking/ifupdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r--networking/ifupdown.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 2b5e8a14e..cb937cac4 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -721,11 +721,7 @@ static struct interfaces_file_t *read_interfaces(const char *filename)
721 currmap = xzalloc(sizeof(*currmap)); 721 currmap = xzalloc(sizeof(*currmap));
722 722
723 while ((first_word = next_word(&rest_of_line)) != NULL) { 723 while ((first_word = next_word(&rest_of_line)) != NULL) {
724 if (currmap->n_matches >= currmap->max_matches) { 724 currmap->match = xrealloc_vector(currmap->match, 4, currmap->n_matches);
725 currmap->max_matches = currmap->max_matches * 2 + 1;
726 currmap->match = xrealloc(currmap->match,
727 sizeof(*currmap->match) * currmap->max_matches);
728 }
729 currmap->match[currmap->n_matches++] = xstrdup(first_word); 725 currmap->match[currmap->n_matches++] = xstrdup(first_word);
730 } 726 }
731 /*currmap->max_mappings = 0; - done by xzalloc */ 727 /*currmap->max_mappings = 0; - done by xzalloc */