From a64ef1615a50262bea79bd84a3f076ade3f0e779 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 27 Jun 2020 07:27:25 +0200 Subject: [PATCH] PsppireDataWindow: Fix use after free error --- src/ui/gui/psppire-data-window.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index 73fb1e1bb1..6a0d4719c9 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -918,13 +918,12 @@ on_recent_files_select (GtkMenuShell *menushell, gpointer user_data) se = psppire_syntax_window_new (encoding); - free (encoding); - if (psppire_window_load (PSPPIRE_WINDOW (se), file, encoding, NULL)) gtk_widget_show (se); else gtk_widget_destroy (se); + g_free (encoding); g_free (file); } -- 2.30.2