[patch] don't try to access list members to free them unless already initialised
j at w1.fi
Fri Apr 28 08:23:35 PDT 2023
On Fri, Apr 21, 2023 at 10:58:42AM -0400, npiazza at disroot.org wrote:
> taken from openbsd ports, and used by many linux distributions.
> does it make sense to include it in wpa_supplicant?
Probably not unless someone can provide an explanation why that would be
> Don't try to access list members to free them unless already
> Index: src/utils/eloop.c
> @@ -1254,6 +1254,9 @@ void eloop_destroy(void)
> struct eloop_timeout *timeout, *prev;
> struct os_reltime now;
> + if (eloop.timeout.prev == NULL)
> + return;
It is not valid to call eloop_destroy() without having first called
eloop_init() successfully. As such, this condition should never be
reached and should not be needed. If there are applications that do
indeed have eloop.timeout.prev == NULL when eloop_destroy() is being
called, those applications should be fixed instead.
Jouni Malinen PGP id EFC895FA
More information about the Hostap