Actually this fixes two bugs: 'strs' was not being freed on every
path, and the tab completion segfault described in the bug report.
size_t i; \
size_t n = count_strings (strs); \
\
size_t i; \
size_t n = count_strings (strs); \
\
- if ( ! xalloc_oversized (nr_words + n, sizeof (struct word))) { \
+ if ( n > 0 && ! xalloc_oversized (nr_words + n, sizeof (struct word))) { \
struct word *w; \
w = realloc (words, sizeof (struct word) * (nr_words + n)); \
\
struct word *w; \
w = realloc (words, sizeof (struct word) * (nr_words + n)); \
\