summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-08-05 09:36:12 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2019-08-05 09:36:12 +0200
commit956ffb7e9602f7d53e5eb693d1b0155913de45bc (patch)
treeab56b6fffbb6db1e447e6c4014922a2edbd6b141
parent1634fff1adf71b01e494056669d150fde96018f4 (diff)
downloadNetworkManager-956ffb7e9602f7d53e5eb693d1b0155913de45bc.tar.gz
settings: fix memory leak
Fixes: d35d3c468a304c3e0e78b4b068d105b1d753876c
-rw-r--r--src/settings/nm-settings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index 9a17d4774c..42a7bca070 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -1455,7 +1455,7 @@ _add_connection_to_first_plugin (NMSettings *self,
GError **error)
{
NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
- GError *first_error = NULL;
+ gs_free_error GError *first_error = NULL;
GSList *iter;
const char *uuid;
@@ -1561,7 +1561,7 @@ _add_connection_to_first_plugin (NMSettings *self,
}
nm_assert (first_error);
- g_propagate_error (error, first_error);
+ g_propagate_error (error, g_steal_pointer (&first_error));
return FALSE;
}