*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Sat, 6 Jun 1992 21:46:01 +0000 (21:46 +0000)
committerRichard Stallman <rms@gnu.org>
Sat, 6 Jun 1992 21:46:01 +0000 (21:46 +0000)
From-SVN: r1177

gcc/cccp.c

index a80f964258e00a3e42a48a0d03fd1247e1095080..1a44d41605c3240c9920554d1de0054430a00690 100644 (file)
@@ -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