From 13cd646b9d2b6d2cd43b02ba8beb5e80cfa02a41 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 2 Jul 2015 14:44:44 +0200 Subject: [PATCH] ifcfg-rh: don't signal removal of the connection we didn't register Removal of a NM_CONTROLLED=no connection and subsequent 'nmcli c reload' would cause a crash. (cherry picked from commit 3b853de2e9ec507a435730294a4bbcd999c44640) --- src/settings/plugins/ifcfg-rh/plugin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/settings/plugins/ifcfg-rh/plugin.c b/src/settings/plugins/ifcfg-rh/plugin.c index 5dd32af83a..1a3f791a4c 100644 --- a/src/settings/plugins/ifcfg-rh/plugin.c +++ b/src/settings/plugins/ifcfg-rh/plugin.c @@ -169,7 +169,8 @@ remove_connection (SCPluginIfcfg *self, NMIfcfgConnection *connection) g_object_ref (connection); g_hash_table_remove (priv->connections, nm_connection_get_uuid (NM_CONNECTION (connection))); - nm_settings_connection_signal_remove (NM_SETTINGS_CONNECTION (connection)); + if (!unmanaged && !unrecognized) + nm_settings_connection_signal_remove (NM_SETTINGS_CONNECTION (connection)); g_object_unref (connection); /* Emit changes _after_ removing the connection */