From 956ffb7e9602f7d53e5eb693d1b0155913de45bc Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 5 Aug 2019 09:36:12 +0200 Subject: [PATCH] settings: fix memory leak Fixes: d35d3c468a304c3e0e78b4b068d105b1d753876c --- src/settings/nm-settings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 9a17d4774..42a7bca07 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; }