From 3c9b743870a524151d31de2c0d758fa7da7ffed6 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 20 Aug 2001 00:36:50 +0000 Subject: memory leak fixed --- mixgtk/mixgtk_fontsel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mixgtk/mixgtk_fontsel.c') diff --git a/mixgtk/mixgtk_fontsel.c b/mixgtk/mixgtk_fontsel.c index 7a9b33e..1a52532 100644 --- a/mixgtk/mixgtk_fontsel.c +++ b/mixgtk/mixgtk_fontsel.c @@ -114,6 +114,7 @@ mixgtk_fontsel_load_defaults (void) infos_[i].widget = mixgtk_widget_factory_get (dialog_ids_[i], widget_ids_[i]); g_assert (infos_[i].widget != NULL); + if (infos_[i].style) gtk_style_unref (infos_[i].style); infos_[i].style = gtk_style_copy (gtk_widget_get_style (infos_[i].widget)); gtk_widget_set_style (infos_[i].widget, infos_[i].style); @@ -208,9 +209,10 @@ on_devices_font_activate (void) void on_fontsel_apply_clicked (void) { - const gchar * name = gtk_font_selection_dialog_get_font_name + gchar * name = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG (fontsel_dialog_)); mixgtk_fontsel_set (widget_, name); + g_free (name); } void -- cgit v1.2.3