All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] Fix Add check for return modem to avoid crash
@ 2010-03-31  9:50 Zhenhua Zhang
  2010-03-31  9:50 ` [PATCH 2/7] Add implementation for S3, S4, S5 command Zhenhua Zhang
  2010-03-31 13:41 ` [PATCH 1/7] Fix Add check for return modem to avoid crash Denis Kenzior
  0 siblings, 2 replies; 11+ messages in thread
From: Zhenhua Zhang @ 2010-03-31  9:50 UTC (permalink / raw)
  To: ofono

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

---
 plugins/modemconf.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/plugins/modemconf.c b/plugins/modemconf.c
index cf0ee8b..e30fce6 100644
--- a/plugins/modemconf.c
+++ b/plugins/modemconf.c
@@ -138,6 +138,10 @@ static struct ofono_modem *create_modem(GKeyFile *keyfile, const char *group)
 		return NULL;
 
 	modem = ofono_modem_create(group, driver);
+	if (!modem) {
+		g_free(driver);
+		return NULL;
+	}
 
 	for (i = 0; setup_helpers[i].driver; i++) {
 		if (!g_strcmp0(driver, setup_helpers[i].driver))
-- 
1.6.6.1


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

end of thread, other threads:[~2010-03-31 13:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31  9:50 [PATCH 1/7] Fix Add check for return modem to avoid crash Zhenhua Zhang
2010-03-31  9:50 ` [PATCH 2/7] Add implementation for S3, S4, S5 command Zhenhua Zhang
2010-03-31  9:50   ` [PATCH 3/7] Add implementation for ATE and other basic command Zhenhua Zhang
2010-03-31  9:50     ` [PATCH 4/7] Add Repeat last command support Zhenhua Zhang
2010-03-31  9:50       ` [PATCH 5/7] Fix echo command back even if don't process it Zhenhua Zhang
2010-03-31  9:50         ` [PATCH 6/7] Add test implementation to support SMS Zhenhua Zhang
2010-03-31  9:50           ` [PATCH 7/7] Add test implementation for CPBS Zhenhua Zhang
2010-03-31 13:42             ` Denis Kenzior
2010-03-31 13:42           ` [PATCH 6/7] Add test implementation to support SMS Denis Kenzior
2010-03-31 13:40         ` [PATCH 5/7] Fix echo command back even if don't process it Denis Kenzior
2010-03-31 13:41 ` [PATCH 1/7] Fix Add check for return modem to avoid crash Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.