summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-11-16 12:43:08 +0100
committerThomas Haller <thaller@redhat.com>2022-11-16 13:43:12 +0100
commit20f5dd2f0837dacfbbe0fb7f0ab383b62768eda5 (patch)
tree6ec848e2eeab97484f63146ec113de40caf3460c
parent38f7ceafbaf74bad3f4c990da3120eb67d9dd4de (diff)
downloadnetwork-manager-applet-20f5dd2f0837dacfbbe0fb7f0ab383b62768eda5.tar.gz
c-e: use cleanup attribute in import_vpn_from_file_cb() for filename
-rw-r--r--src/connection-editor/connection-helpers.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index 6ed85577..bba4d92c 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -221,7 +221,7 @@ typedef struct {
static void
import_vpn_from_file_cb (GtkWidget *dialog, gint response, gpointer user_data)
{
- char *filename = NULL;
+ gs_free char *filename = NULL;
ImportVpnInfo *info = (ImportVpnInfo *) user_data;
NMConnection *connection = NULL;
GError *error = NULL;
@@ -251,8 +251,6 @@ import_vpn_from_file_cb (GtkWidget *dialog, gint response, gpointer user_data)
info->user_data);
}
- g_free (filename);
-
out:
if (!connection) {
info->result_func (FUNC_TAG_PAGE_NEW_CONNECTION_RESULT_CALL,