widget-factory: Plug a memory leak

This commit is contained in:
Matthias Clasen 2014-06-28 23:27:36 -04:00
parent c304a84f2c
commit b3b861c9d6

View File

@ -73,14 +73,17 @@ activate_about (GSimpleAction *action,
"Cosimo Cecchi", "Cosimo Cecchi",
NULL NULL
}; };
gchar *version;
version = g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
PACKAGE_VERSION,
gtk_get_major_version (),
gtk_get_minor_version (),
gtk_get_micro_version ());
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)), gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
"program-name", "GTK+ Widget Factory", "program-name", "GTK+ Widget Factory",
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d", "version", version,
PACKAGE_VERSION,
gtk_get_major_version (),
gtk_get_minor_version (),
gtk_get_micro_version ()),
"copyright", "(C) 1997-2013 The GTK+ Team", "copyright", "(C) 1997-2013 The GTK+ Team",
"license-type", GTK_LICENSE_LGPL_2_1, "license-type", GTK_LICENSE_LGPL_2_1,
"website", "http://www.gtk.org", "website", "http://www.gtk.org",
@ -89,6 +92,8 @@ activate_about (GSimpleAction *action,
"logo-icon-name", "gtk3-widget-factory", "logo-icon-name", "gtk3-widget-factory",
"title", "About GTK+ Widget Factory", "title", "About GTK+ Widget Factory",
NULL); NULL);
g_free (version);
} }
static void static void