diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-03-31 08:22:03 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-03-31 08:22:03 -0500 |
commit | b046142044e8f2729713f56c20aeb8c4a8ab4e21 (patch) | |
tree | 6b05bb9100a5978771f0a4327880dba79c525c7a | |
parent | 86b0fa319484bc11e834a5a4feed937deff46a68 (diff) | |
download | ofono-b046142044e8f2729713f56c20aeb8c4a8ab4e21.tar.bz2 |
Fix: Potential crash in modemconf
-rw-r--r-- | plugins/modemconf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/modemconf.c b/plugins/modemconf.c index cf0ee8b7..281a7622 100644 --- a/plugins/modemconf.c +++ b/plugins/modemconf.c @@ -138,12 +138,15 @@ static struct ofono_modem *create_modem(GKeyFile *keyfile, const char *group) return NULL; modem = ofono_modem_create(group, driver); + if (modem == NULL) + goto error; for (i = 0; setup_helpers[i].driver; i++) { if (!g_strcmp0(driver, setup_helpers[i].driver)) setup_helpers[i].func(modem, keyfile, group); } +error: g_free(driver); return modem; |