From fedfda9fb5a587cac8c81ec13e647aa9b7177747 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 16 Nov 2020 14:22:18 -0800 Subject: [PATCH] simauth: check driver for NULL before canceling request If the ofono modem got removed before it was fully initialized this could cause a crash. --- src/simauth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simauth.c b/src/simauth.c index a0d56c76..01e252c3 100644 --- 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,