From: Caiwen Zhang <[email protected]>

When is blocked, gprs/network atom is removed, it will
remove the SIM SPN watch which is added when it is created.
If at that time, SIM atom has been removed ofonod will crash
due to "sim->spn_watches" is NULL.

There is the same issue about network registration status watch.
---
 src/watch.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/watch.c b/src/watch.c
index dfb01fb..906c559 100644
--- a/src/watch.c
+++ b/src/watch.c
@@ -53,6 +53,9 @@ gboolean __ofono_watchlist_remove_item(struct ofono_watchlist 
*watchlist,
        GSList *p;
        GSList *c;
 
+       if (watchlist == NULL)
+               return;
+
        p = NULL;
        c = watchlist->items;
 
-- 
1.7.9.5

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to