Re: [PATCH] libcody: Avoid double-free

2021-10-21 Thread Jason Merrill via Gcc-patches
On 10/21/21 09:27, Jonathan Wakely wrote: If the listen call fails then 'goto fail' will jump to that label and use freeaddrinfo again. Set the pointer to null to prevent that. OK. libcody/ChangeLog: * netserver.cc (ListenInet6): Set pointer to null after deallocation. ---

Re: [PATCH] libcody: Avoid double-free

2021-10-21 Thread Jonathan Wakely via Gcc-patches
Oops, this patch and the next one were only meant for gcc-patches, not the libstdc++ list as well - sorry! On Thu, 21 Oct 2021 at 14:27, Jonathan Wakely via Libstdc++ < libstd...@gcc.gnu.org> wrote: > If the listen call fails then 'goto fail' will jump to that label and > use freeaddrinfo again.

[PATCH] libcody: Avoid double-free

2021-10-21 Thread Jonathan Wakely via Gcc-patches
If the listen call fails then 'goto fail' will jump to that label and use freeaddrinfo again. Set the pointer to null to prevent that. libcody/ChangeLog: * netserver.cc (ListenInet6): Set pointer to null after deallocation. --- libcody/netserver.cc | 1 + 1 file changed, 1 insert