summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-11-16 12:43:38 +0100
committerThomas Haller <thaller@redhat.com>2022-11-16 13:43:12 +0100
commit9cc73295ec0c2be066c4a5eb3869a0a592f7c7f7 (patch)
treea63d348987e9804cf879036f33b78bd0ff8634bf
parent20f5dd2f0837dacfbbe0fb7f0ab383b62768eda5 (diff)
downloadnetwork-manager-applet-9cc73295ec0c2be066c4a5eb3869a0a592f7c7f7.tar.gz
c-e: fix leaking connection/error in import_vpn_from_file_cb()
Apparently, not leaking stuff is hard. The cleanup attribute simplifies that.
-rw-r--r--src/connection-editor/connection-helpers.c4
1 files 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)