diff options
Diffstat (limited to 'plugins/ofono.c')
-rw-r--r-- | plugins/ofono.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c index 78f8f196..82413b6e 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -1301,10 +1301,13 @@ static void remove_all_contexts(struct modem_data *modem) if (modem->context_list == NULL) return; - for (list = modem->context_list; list; list = list->next) { + list = modem->context_list; + while (list) { struct network_context *context = list->data; remove_cm_context(modem, context); + + list = modem->context_list; } g_slist_free(modem->context_list); modem->context_list = NULL; |