Commit 52320a47 by Richard Kenner

(do_error, do_warning): Fix memory leak.

From-SVN: r13752
parent 982ce905
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment