If the table is not yet empty, there are still references stored inside
the table and inserted into the global reference list. Clean these up
before freeing the table to avoid an use-after-free if a socket was not
removed and tracing is enabled.
Fixes: a6ff0e0810b4 ("trace: Add active reference tracking")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
table->table[i].handler);
wpa_trace_dump("eloop sock", &table->table[i]);
}
+ eloop_trace_sock_remove_ref(table);
os_free(table->table);
}
}