mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +01:00
simauth: remove unregister API
The unregister simauth API was unused and not required, this also fixes a double free when freeing the NAI.
This commit is contained in:
parent
74d991bf8e
commit
f7a9caef2b
@ -73,22 +73,6 @@ bool iwd_sim_auth_register(struct iwd_sim_auth *auth)
|
|||||||
return l_queue_push_head(auth_providers, auth);
|
return l_queue_push_head(auth_providers, auth);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iwd_sim_auth_unregister(struct iwd_sim_auth *auth)
|
|
||||||
{
|
|
||||||
if (auth->driver->cancel_request)
|
|
||||||
auth->driver->cancel_request(auth, auth->pending);
|
|
||||||
|
|
||||||
WATCHLIST_NOTIFY_NO_ARGS(&auth->auth_watchers,
|
|
||||||
sim_auth_unregistered_cb_t);
|
|
||||||
|
|
||||||
l_free(auth->nai);
|
|
||||||
|
|
||||||
auth->aka_supported = false;
|
|
||||||
auth->sim_supported = false;
|
|
||||||
|
|
||||||
l_queue_remove(auth_providers, auth);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *iwd_sim_auth_get_data(struct iwd_sim_auth *auth)
|
void *iwd_sim_auth_get_data(struct iwd_sim_auth *auth)
|
||||||
{
|
{
|
||||||
return auth->driver_data;
|
return auth->driver_data;
|
||||||
@ -109,7 +93,13 @@ static void destroy_provider(void *data)
|
|||||||
|
|
||||||
void iwd_sim_auth_remove(struct iwd_sim_auth *auth)
|
void iwd_sim_auth_remove(struct iwd_sim_auth *auth)
|
||||||
{
|
{
|
||||||
iwd_sim_auth_unregister(auth);
|
if (auth->driver->cancel_request)
|
||||||
|
auth->driver->cancel_request(auth, auth->pending);
|
||||||
|
|
||||||
|
WATCHLIST_NOTIFY_NO_ARGS(&auth->auth_watchers,
|
||||||
|
sim_auth_unregistered_cb_t);
|
||||||
|
|
||||||
|
l_queue_remove(auth_providers, auth);
|
||||||
|
|
||||||
destroy_provider(auth);
|
destroy_provider(auth);
|
||||||
}
|
}
|
||||||
|
@ -95,8 +95,6 @@ void iwd_sim_auth_set_data(struct iwd_sim_auth *auth, void *driver_data);
|
|||||||
|
|
||||||
bool iwd_sim_auth_register(struct iwd_sim_auth *auth);
|
bool iwd_sim_auth_register(struct iwd_sim_auth *auth);
|
||||||
|
|
||||||
void iwd_sim_auth_unregister(struct iwd_sim_auth *auth);
|
|
||||||
|
|
||||||
void *iwd_sim_auth_get_data(struct iwd_sim_auth *auth);
|
void *iwd_sim_auth_get_data(struct iwd_sim_auth *auth);
|
||||||
|
|
||||||
void iwd_sim_auth_remove(struct iwd_sim_auth *auth);
|
void iwd_sim_auth_remove(struct iwd_sim_auth *auth);
|
||||||
|
Loading…
Reference in New Issue
Block a user