From 535e01ed893f6e67f73ae6a9de03e072d86b78e3 Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 21 Oct 2021 20:12:17 +0200 Subject: dlg-package-installer: fix memory leak --- src/dlg-package-installer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/dlg-package-installer.c b/src/dlg-package-installer.c index 1873cbe..d278987 100644 --- a/src/dlg-package-installer.c +++ b/src/dlg-package-installer.c @@ -296,9 +296,11 @@ dlg_package_installer (FrWindow *window, { char *secondary_text; GtkWidget *dialog; + char *description; + description = g_content_type_get_description (idata->archive->content_type); secondary_text = g_strdup_printf (_("There is no command installed for %s files.\nDo you want to search for a command to open this file?"), - g_content_type_get_description (idata->archive->content_type)); + description); dialog = _gtk_message_dialog_new (GTK_WINDOW (idata->window), GTK_DIALOG_MODAL, "dialog-error", @@ -319,6 +321,7 @@ dlg_package_installer (FrWindow *window, g_signal_connect (dialog, "response", G_CALLBACK (confirm_search_dialog_response_cb), idata); gtk_widget_show (dialog); + g_free (description); g_free (secondary_text); } -- cgit v1.2.1