Message ID | 20240716101136.44583-4-m.rudik@omp.ru (mailing list archive) |
---|---|
State | Accepted |
Commit | a4efa493a6aa6def4e4555e5535af1a90cb6e49f |
Headers | show |
Series | Fix issues found with static analyzer | expand |
diff --git a/src/stk.c b/src/stk.c index 70e8ae30..083920a3 100644 --- a/src/stk.c +++ b/src/stk.c @@ -121,6 +121,9 @@ static int stk_respond(struct ofono_stk *stk, struct stk_response *rsp, if (stk->driver->terminal_response == NULL) return -ENOSYS; + if (stk->pending_cmd == NULL) + return -EINVAL; + rsp->src = STK_DEVICE_IDENTITY_TYPE_TERMINAL; rsp->dst = STK_DEVICE_IDENTITY_TYPE_UICC; rsp->number = stk->pending_cmd->number;