Hi Bruno,

Bruno Haible via Bug reports for the GNU Internet utilities
<bug-inetutils@gnu.org> writes:

> gcc 15 reports this warning from -Wanalyzer-use-after-free:
> ../../talkd/table.c:65:30: warning: use after 'free' of 'ptr' [CWE-416]
>
> gcc is right here: Accessing ptr->next after calling free (ptr)
> (inside table_delete (ptr)) is invalid.

I don't recall seeing this using -fanalyzer previously, so I assume
there were some improvements in GCC 15. Thanks for the patch.

Simon, this patch looks correct to me. Can you apply it? Not sure if it
needs to be marked '(tiny patch)' or not.

Thanks,
Collin

  • fix a use-afte... Bruno Haible via Bug reports for the GNU Internet utilities
    • Re: fix a... Collin Funk

Reply via email to