https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125087
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu.org
--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to anlauf from comment #1)
> Some context:
>
> /* free_format_data()-- Free all allocated format data. */
>
> void
> free_format_data (format_data *fmt)
> {
> ...
> free (fmt);
> fmt = NULL;
> }
>
> It looks like the intent was to nullify the pointer in the caller,
> but this does not work the way it is coded.
The intent was to set it to NULL so that if the function is called again it
will do nothing.
void
free_format_data (format_data *fmt)
{
fnode_array *fa, *fa_next;
fnode *fnp;
if (fmt == NULL)
return;
...
to avoid attempting to free the format hash table if it has already been freed.