(do_error, do_warning): Fix memory leak.

From-SVN: r13752
This commit is contained in:
Richard Kenner 1997-03-19 17:19:27 -05:00
parent 982ce90579
commit 52320a474f
2 changed files with 4 additions and 4 deletions

View File

@ -6721,7 +6721,7 @@ do_error (buf, limit, op, keyword)
struct directive *keyword;
{
int length = limit - buf;
U_CHAR *copy = (U_CHAR *) xmalloc (length + 1);
U_CHAR *copy = (U_CHAR *) alloca (length + 1);
bcopy ((char *) buf, (char *) copy, length);
copy[length] = 0;
SKIP_WHITE_SPACE (copy);
@ -6740,7 +6740,7 @@ do_warning (buf, limit, op, keyword)
struct directive *keyword;
{
int length = limit - buf;
U_CHAR *copy = (U_CHAR *) xmalloc (length + 1);
U_CHAR *copy = (U_CHAR *) alloca (length + 1);
bcopy ((char *) buf, (char *) copy, length);
copy[length] = 0;
SKIP_WHITE_SPACE (copy);

View File

@ -3880,7 +3880,7 @@ do_error (pfile, keyword, buf, limit)
U_CHAR *buf, *limit;
{
int length = limit - buf;
U_CHAR *copy = (U_CHAR *) xmalloc (length + 1);
U_CHAR *copy = (U_CHAR *) alloca (length + 1);
bcopy (buf, copy, length);
copy[length] = 0;
SKIP_WHITE_SPACE (copy);
@ -3901,7 +3901,7 @@ do_warning (pfile, keyword, buf, limit)
U_CHAR *buf, *limit;
{
int length = limit - buf;
U_CHAR *copy = (U_CHAR *) xmalloc (length + 1);
U_CHAR *copy = (U_CHAR *) alloca (length + 1);
bcopy (buf, copy, length);
copy[length] = 0;
SKIP_WHITE_SPACE (copy);