aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 3ef47ba71..a46b5d2c4 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -400,11 +400,8 @@ static void free_tab_completion_data(void)
400 400
401static void add_match(char *matched) 401static void add_match(char *matched)
402{ 402{
403 int nm = num_matches; 403 matches = xrealloc_vector(matches, 4, num_matches);
404 int nm1 = nm + 1; 404 matches[num_matches] = matched;
405
406 matches = xrealloc(matches, nm1 * sizeof(char *));
407 matches[nm] = matched;
408 num_matches++; 405 num_matches++;
409} 406}
410 407