Fixes a crash when SIM Session End is received while waiting for user response to SELECT ITEM command. --- src/stk.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/stk.c b/src/stk.c index bc46b2f..cda378f 100644 --- a/src/stk.c +++ b/src/stk.c @@ -115,6 +115,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; -- 1.7.0.4 _______________________________________________ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono