wpa_priv: Handler driver global_deinit() on termination path
This avoids a theoretical resource leak on exit path if wpa_priv is killed while there is a wpa_supplicant process using it. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
ce0f899a3d
commit
6d97561dcd
1 changed files with 6 additions and 2 deletions
|
@ -685,8 +685,12 @@ static void wpa_priv_interface_deinit(struct wpa_priv_interface *iface)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (iface->drv_priv && iface->driver->deinit)
|
||||
iface->driver->deinit(iface->drv_priv);
|
||||
if (iface->drv_priv) {
|
||||
if (iface->driver->deinit)
|
||||
iface->driver->deinit(iface->drv_priv);
|
||||
if (iface->drv_global_priv)
|
||||
iface->driver->global_deinit(iface->drv_global_priv);
|
||||
}
|
||||
|
||||
if (iface->fd >= 0) {
|
||||
eloop_unregister_read_sock(iface->fd);
|
||||
|
|
Loading…
Reference in a new issue