diff options
author | Thomas Haller <thaller@redhat.com> | 2018-03-29 10:30:49 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-04-13 09:09:46 +0200 |
commit | 213323a6a7a50ed11608cd536833d74c9e9e399e (patch) | |
tree | 8b5fdcf1f1739be0e255a95c13bd9adaf9ad9bbb | |
parent | 8c56c47bba8f1d8d064ac3699308005805a6f6bd (diff) | |
download | NetworkManager-213323a6a7a50ed11608cd536833d74c9e9e399e.tar.gz |
settings: fix unrefing setting is there are no plugins loaded
This wasn't a problem, because load_plugins() can only fails
if the settings plugins fail to load, which can only happen
if you have a broken installation.
-rw-r--r-- | src/settings/nm-settings.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 4a50d3b9a5..bf53b62a07 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -1847,10 +1847,8 @@ nm_settings_start (NMSettings *self, GError **error) /* Load the plugins; fail if a plugin is not found. */ plugins = nm_config_data_get_plugins (nm_config_get_data_orig (priv->config), TRUE); - if (!load_plugins (self, (const char **) plugins, error)) { - g_object_unref (self); + if (!load_plugins (self, (const char **) plugins, error)) return FALSE; - } load_connections (self); check_startup_complete (self); |