*: fix places where we were still using malloc/realloc

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2010-01-08 09:07:50 +01:00
parent ef3817c6dc
commit 9037787eae
5 changed files with 28 additions and 45 deletions

View File

@ -1094,7 +1094,7 @@ static void process_files(void)
/* append next_line, read new next_line. */
}
len = strlen(pattern_space);
pattern_space = realloc(pattern_space, len + strlen(next_line) + 2);
pattern_space = xrealloc(pattern_space, len + strlen(next_line) + 2);
pattern_space[len] = '\n';
strcpy(pattern_space + len+1, next_line);
last_gets_char = next_gets_char;