Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH] fix ofonod crash when pin is blocked
@ 2013-09-11 17:13 caiwen.zhang
  2013-09-11 18:01 ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: caiwen.zhang @ 2013-09-11 17:13 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

From: Caiwen Zhang <caiwen.zhang@intel.com>

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-12 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11 17:13 [PATCH] fix ofonod crash when pin is blocked caiwen.zhang
2013-09-11 18:01 ` Denis Kenzior
2013-09-12  0:53   ` Zhang, Caiwen
2013-09-12 13:28     ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox