core,cli: replace wrong pattern for clearing GError

Use gs_free_error instead of gs_free.

(cherry picked from commit 65a0208ba0)
(cherry picked from commit 10ccdf4b81)
This commit is contained in:
Beniamino Galvani 2017-06-27 09:29:18 +02:00
parent 14b65ec28d
commit af4c406cea

View file

@ -1126,7 +1126,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");
@ -1603,7 +1603,7 @@ dispose (GObject *object)
NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
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");