From d7931c4d2a8a6d1a11961a6a1fa4a0de76128f11 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 27 May 2019 10:35:44 -0300 Subject: [PATCH] Fixing memory allocation error on about dialog. --- src/pw3270/dialog.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pw3270/dialog.c b/src/pw3270/dialog.c index 8c189ea..0ece7c9 100644 --- a/src/pw3270/dialog.c +++ b/src/pw3270/dialog.c @@ -515,14 +515,14 @@ } } + g_autofree gchar * version = #ifdef PACKAGE_RELEASE - text = g_strdup_printf(_("Version %s-%s"),PACKAGE_VERSION,G_STRINGIFY(PACKAGE_RELEASE)); + g_strdup_printf(_("Version %s-%s"),PACKAGE_VERSION,G_STRINGIFY(PACKAGE_RELEASE)); #else - text = g_strdup_printf(_("Version %s-%s"),PACKAGE_VERSION,G_STRINGIFY(BUILD_DATE)); + g_strdup_printf(_("Version %s-%s"),PACKAGE_VERSION,G_STRINGIFY(BUILD_DATE)); #endif // PACKAGE_REVISION - gtk_about_dialog_set_version(dialog,text); - g_free(text); + gtk_about_dialog_set_version(dialog,version); gtk_about_dialog_set_copyright(dialog, "Copyright © 2008 Banco do Brasil S.A." ); @@ -532,7 +532,7 @@ gtk_about_dialog_set_license(dialog, gettext( license ) ); gtk_about_dialog_set_wrap_license(dialog,TRUE); - gtk_about_dialog_set_website(dialog,"https://portal.softwarepublico.gov.br/social/pw3270/"); + gtk_about_dialog_set_website(dialog,_("https://portal.softwarepublico.gov.br/social/pw3270/")); gtk_about_dialog_set_website_label(dialog,_( "Brazilian Public Software Portal" )); gtk_about_dialog_set_authors(dialog,authors); -- libgit2 0.21.2