3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 06:29:23 +01:00

simauth: check driver for NULL before canceling request

If the ofono modem got removed before it was fully initialized this
could cause a crash.
This commit is contained in:
James Prestwood 2020-11-16 14:22:18 -08:00 committed by Denis Kenzior
parent 95df3e660b
commit fedfda9fb5

View File

@ -99,7 +99,7 @@ static void destroy_provider(void *data)
void iwd_sim_auth_remove(struct iwd_sim_auth *auth)
{
if (auth->driver->cancel_request)
if (auth->driver && auth->driver->cancel_request)
auth->driver->cancel_request(auth, auth->pending);
WATCHLIST_NOTIFY_NO_ARGS(&auth->auth_watchers,