summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2013-04-18 07:07:25 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-18 11:17:05 (GMT)
commitc6025eca557d82d9514108ede6ba0aa266746e64 (patch)
treea56a714d607384cf92498bca965d7617df3b35ac /plugins
parent1d1f9c7ccabdcaa74cdb5c4c791fc2bdb32ec42b (diff)
downloadconnman-c6025eca557d82d9514108ede6ba0aa266746e64.zip
connman-c6025eca557d82d9514108ede6ba0aa266746e64.tar.gz
connman-c6025eca557d82d9514108ede6ba0aa266746e64.tar.bz2
session: Do not fail when creating default policy configuration
Do not handle the small alloc failures because glib will abort when memory is tight anyway.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/session_policy_local.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/plugins/session_policy_local.c b/plugins/session_policy_local.c
index 7125f35..dfaeaea 100644
--- a/plugins/session_policy_local.c
+++ b/plugins/session_policy_local.c
@@ -127,11 +127,6 @@ static struct policy_data *create_policy(const char *ident)
return NULL;
policy->config = connman_session_create_default_config();
- if (policy->config == NULL) {
- g_free(policy);
- return NULL;
- }
-
policy->refcount = 1;
policy->ident = g_strdup(ident);
@@ -369,7 +364,6 @@ static void update_session(struct connman_session *session)
static void remove_policy(struct policy_data *policy)
{
connman_bool_t update = FALSE;
- int err;
if (policy->session != NULL)
update = TRUE;
@@ -379,12 +373,7 @@ static void remove_policy(struct policy_data *policy)
if (update == FALSE)
return;
- err = connman_session_set_default_config(policy->config);
- if (err < 0) {
- connman_session_destroy(policy->session);
- return;
- }
-
+ connman_session_set_default_config(policy->config);
update_session(policy->session);
}