summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/settings/plugins/ifnet/net_parser.c6
-rw-r--r--src/settings/plugins/ifnet/plugin.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/settings/plugins/ifnet/net_parser.c b/src/settings/plugins/ifnet/net_parser.c
index 1cf46fbf93..755767e296 100644
--- a/src/settings/plugins/ifnet/net_parser.c
+++ b/src/settings/plugins/ifnet/net_parser.c
@@ -396,7 +396,11 @@ ifnet_init (gchar * config_file)
const char *
ifnet_get_data (const char *conn_name, const char *key)
{
- GHashTable *conn = g_hash_table_lookup (conn_table, conn_name);
+ GHashTable *conn;
+
+ g_return_val_if_fail (conn_name && key, NULL);
+
+ conn = g_hash_table_lookup (conn_table, conn_name);
if (conn)
return g_hash_table_lookup (conn, key);
diff --git a/src/settings/plugins/ifnet/plugin.c b/src/settings/plugins/ifnet/plugin.c
index 3eb1ed52f7..6896a4da1a 100644
--- a/src/settings/plugins/ifnet/plugin.c
+++ b/src/settings/plugins/ifnet/plugin.c
@@ -393,7 +393,7 @@ check_unmanaged (gpointer key, gpointer data, gpointer user_data)
conn_name = nm_ifnet_connection_get_conn_name (connection);
- if (is_managed (conn_name))
+ if (!conn_name || is_managed (conn_name))
return;
nm_log_info (LOGD_SETTINGS, "Checking unmanaged: %s", conn_name);