Skip to contentSkip to conversation

simauth: check driver for NULL before canceling request

PATCH Applied James Prestwood 2 participants 2 messages Nov 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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(-)
src/simauth.c +1 -1
index a0d56c76..01e252c3 100644
@@ -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,
Signature · 1 line
2.26.2
#1 lore raw

Hi James,

Quoted 6 lines · James Prestwood

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(-)

Applied, thanks.

Regards,
-Denis