Commit 91fd36e1 authored by Jiří Klimeš's avatar Jiří Klimeš

ifnet: fix a crash in ifnet settings plugin (bgo #737645)

conn_name can be NULL now as the connections are tracked by UUID
(see commit 689dadaf)

Sep 29 21:20:34 Jdeapad NetworkManager[1339]: <info> getting unmanaged specs...
Sep 29 21:20:34 Jdeapad NetworkManager[1339]: <info> Checking unmanaged: (null)
Sep 29 21:20:38 Jdeapad kernel: NetworkManager[1339]: segfault at 0 ip
00007f1bfffbedd0 sp 00007fff98daa628 error 4 in
libglib-2.0.so.0.4002.0[7f1bfff86000+130000]

https://bugzilla.gnome.org/show_bug.cgi?id=737645
parent 5cf985e1
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment