summaryrefslogtreecommitdiffstats
path: root/src/stk.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2013-01-01 21:40:14 -0600
committerDenis Kenzior <denkenz@gmail.com>2013-01-01 21:40:14 -0600
commit7fca6fca90b2a6bd12466fac284fdf583d3cfc11 (patch)
tree3f6db9e29d4a4c78e463d9b78b2717bce9d431dd /src/stk.c
parente744f9159d0bceab4e7ec4073cb2f62f4f2e06d8 (diff)
downloadofono-7fca6fca90b2a6bd12466fac284fdf583d3cfc11.tar.bz2
stk: Fix crash with Modem-Handled SIM Refresh
Diffstat (limited to 'src/stk.c')
-rw-r--r--src/stk.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/stk.c b/src/stk.c
index 6278930a..79747514 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -3095,8 +3095,14 @@ void ofono_stk_proactive_command_handled_notify(struct ofono_stk *stk,
break;
case STK_COMMAND_TYPE_REFRESH:
+ /*
+ * On a refresh we should not try to free the pending command,
+ * as the stk atom itself likely disappeared as a result.
+ * If it has not, then any subsequent proactive command, or
+ * session end notification will free it anyway
+ */
handle_command_refresh(stk->pending_cmd, NULL, stk);
- break;
+ return;
}
out: