This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
free(NULL) fix
- To: gcc-patches at gcc dot gnu dot org (gcc-patches at gcc dot gnu dot org)
- Subject: free(NULL) fix
- From: "Philippe De Muyter" <phdm at macqel dot be>
- Date: Sun, 31 Oct 1999 16:53:47 +0100 (CET)
Symptom :
xgcc: Internal compiler error: program cc1 got fatal signal 11
Fix :
Sun Oct 31 16:00:59 1999 Philippe De Muyter <phdm@macqel.be>
* function.c (free_after_compilation): Check if `x_parm_reg_stack_loc'
is non-NULL before calling `free'.
--- ./gcc/function.c Sun Oct 31 13:09:54 1999
+++ ./gcc/function.c Thu Oct 21 16:50:41 1999
@@ -426,7 +426,8 @@ free_after_compilation (f)
if (free_machine_status)
(*free_machine_status) (f);
- free (f->x_parm_reg_stack_loc);
+ if (f->x_parm_reg_stack_loc)
+ free (f->x_parm_reg_stack_loc);
f->arg_offset_rtx = NULL;
f->return_rtx = NULL;