From b576c6b6c6e3bd4fdc027d0e8c6dac5f053e043e Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sat, 6 Jun 1992 21:46:01 +0000 Subject: [PATCH] *** empty log message *** From-SVN: r1177 --- gcc/cccp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/cccp.c b/gcc/cccp.c index a80f964258e..1a44d41605c 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 -- 2.30.2