From 9cc73295ec0c2be066c4a5eb3869a0a592f7c7f7 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 16 Nov 2022 12:43:38 +0100 Subject: c-e: fix leaking connection/error in import_vpn_from_file_cb() Apparently, not leaking stuff is hard. The cleanup attribute simplifies that. --- src/connection-editor/connection-helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c index bba4d92c..0b078eba 100644 --- a/src/connection-editor/connection-helpers.c +++ b/src/connection-editor/connection-helpers.c @@ -223,8 +223,8 @@ import_vpn_from_file_cb (GtkWidget *dialog, gint response, gpointer user_data) { gs_free char *filename = NULL; ImportVpnInfo *info = (ImportVpnInfo *) user_data; - NMConnection *connection = NULL; - GError *error = NULL; + gs_unref_object NMConnection *connection = NULL; + gs_free_error GError *error = NULL; gboolean canceled = TRUE; if (response != GTK_RESPONSE_ACCEPT) -- cgit v1.2.1