aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-06-06 21:46:01 +0000
committerRichard Stallman <rms@gnu.org>1992-06-06 21:46:01 +0000
commitb576c6b6c6e3bd4fdc027d0e8c6dac5f053e043e (patch)
tree40673b764ba0cf479a9d74db7894b1567b0926ef /gcc
parent64359a8ae8257691687f486928b0cfe73066a4c1 (diff)
downloadgcc-b576c6b6c6e3bd4fdc027d0e8c6dac5f053e043e.zip
gcc-b576c6b6c6e3bd4fdc027d0e8c6dac5f053e043e.tar.gz
gcc-b576c6b6c6e3bd4fdc027d0e8c6dac5f053e043e.tar.bz2
*** empty log message ***
From-SVN: r1177
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cccp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index a80f964..1a44d41 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -4009,7 +4009,7 @@ finclude (f, fname, op, system_header_p, dirptr)
fp->dir = dirptr;
if (S_ISREG (st_mode)) {
- fp->buf = (U_CHAR *) alloca (st_size + 2);
+ fp->buf = (U_CHAR *) xmalloc (st_size + 2);
fp->bufp = fp->buf;
/* Read the file contents, knowing that st_size is an upper bound
@@ -4084,12 +4084,14 @@ finclude (f, fname, op, system_header_p, dirptr)
indepth--;
input_file_stack_tick++;
output_line_command (&instack[indepth], op, 0, leave_file);
+ free (fp->buf);
return;
nope:
perror_with_name (fname);
close (f);
+ free (fp->buf);
}
/* Record that inclusion of the file named FILE