commit fedfda9fb5a587cac8c81ec13e647aa9b7177747
parent 95df3e660bcccd5dc2fb015ea533406df4458b0e
Author: James Prestwood <prestwoj@gmail.com>
Date: Mon, 16 Nov 2020 14:22:18 -0800
simauth: check driver for NULL before canceling request
If the ofono modem got removed before it was fully initialized this
could cause a crash.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/simauth.c b/src/simauth.c
@@ -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,