aboutsummaryrefslogtreecommitdiff
path: root/gcc/cccp.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-03-19 17:19:27 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1997-03-19 17:19:27 -0500
commit52320a474f6819a407e2be7321551fff49879755 (patch)
treec9f79c87dffb86895ebd93cfdeafc929dc6b5e06 /gcc/cccp.c
parent982ce905794acff67d945df711e476799b0652f9 (diff)
downloadgcc-52320a474f6819a407e2be7321551fff49879755.zip
gcc-52320a474f6819a407e2be7321551fff49879755.tar.gz
gcc-52320a474f6819a407e2be7321551fff49879755.tar.bz2
(do_error, do_warning): Fix memory leak.
From-SVN: r13752
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r--gcc/cccp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 0033e6b..cd02b59 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -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);