summaryrefslogtreecommitdiff
path: root/plugins/ofono.c
diff options
context:
space:
mode:
authorNishant Chaprana <n.chaprana@samsung.com>2019-07-04 17:41:09 +0530
committerNishant Chaprana <n.chaprana@samsung.com>2019-07-04 17:41:17 +0530
commit6b2381a2adabea7d8309ff158ef675ff88184305 (patch)
tree2c9b2bb6d8b214acc18b8e784e6841f468a5a040 /plugins/ofono.c
parent9362752a471a5c892d679548fbf2828d5fc5684b (diff)
downloadconnman-6b2381a2adabea7d8309ff158ef675ff88184305.tar.gz
connman-6b2381a2adabea7d8309ff158ef675ff88184305.tar.bz2
connman-6b2381a2adabea7d8309ff158ef675ff88184305.zip
Imported Upstream version 1.37upstream/1.37
Change-Id: Ib5957e7ee3a9315ee86a331189bc3e9e71751ee8 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Diffstat (limited to 'plugins/ofono.c')
-rw-r--r--plugins/ofono.c5
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;