From 65a0208ba0a6ef6faa6120dc537f9b5de6fecfad Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 27 Jun 2017 09:29:18 +0200 Subject: [PATCH] core,cli: replace wrong pattern for clearing GError Use gs_free_error instead of gs_free. --- clients/cli/general.c | 2 +- src/nm-hostname-manager.c | 2 +- src/supplicant/nm-supplicant-interface.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clients/cli/general.c b/clients/cli/general.c index b8947cf75d..97caf1f606 100644 --- a/clients/cli/general.c +++ b/clients/cli/general.c @@ -655,7 +655,7 @@ show_general_logging (NmCli *nmc) { gs_free char *level_cache = NULL; gs_free char *domains_cache = NULL; - gs_free GError *error = NULL; + gs_free_error GError *error = NULL; const char *fields_str = NULL; GetGeneralLoggingData d = { .level = &level_cache, diff --git a/src/nm-hostname-manager.c b/src/nm-hostname-manager.c index 3ffd8e3680..f569ab86cc 100644 --- a/src/nm-hostname-manager.c +++ b/src/nm-hostname-manager.c @@ -580,7 +580,7 @@ constructed (GObject *object) NMHostnameManagerPrivate *priv = NM_HOSTNAME_MANAGER_GET_PRIVATE (self); GDBusProxy *proxy; GVariant *variant; - gs_free GError *error = NULL; + gs_free_error GError *error = NULL; proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, 0, NULL, HOSTNAMED_SERVICE_NAME, HOSTNAMED_SERVICE_PATH, diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c index a4681297d3..b90975fb21 100644 --- a/src/supplicant/nm-supplicant-interface.c +++ b/src/supplicant/nm-supplicant-interface.c @@ -1453,7 +1453,7 @@ nm_supplicant_interface_disconnect (NMSupplicantInterface * self) /* Cancel all pending calls related to a prior connection attempt */ if (priv->assoc_data) { - gs_free GError *error = NULL; + gs_free_error GError *error = NULL; nm_utils_error_set_cancelled (&error, FALSE, "NMSupplicantInterface"); assoc_return (self, error, "abort due to disconnect"); @@ -1949,7 +1949,7 @@ dispose (GObject *object) } if (priv->assoc_data) { - gs_free GError *error = NULL; + gs_free_error GError *error = NULL; nm_utils_error_set_cancelled (&error, TRUE, "NMSupplicantInterface"); assoc_return (self, error, "cancelled due to dispose of supplicant interface");