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 3b853de2e9)
This commit is contained in:
Lubomir Rintel 2015-07-02 14:44:44 +02:00
parent e3491b671c
commit 13cd646b9d

View file

@ -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 */