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:
Jouni Malinen 2016-12-03 17:38:01 +02:00
parent ce0f899a3d
commit 6d97561dcd

View File

@ -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);