Don't leak preedit_string and preedit_attrs. (#322332, Paolo Borelli)

2006-01-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_finalize): Don't
	leak preedit_string and preedit_attrs.  (#322332, Paolo
	Borelli)
This commit is contained in:
Matthias Clasen 2006-01-09 18:20:23 +00:00 committed by Matthias Clasen
parent 8e3d4a9418
commit bd90bfbc96
3 changed files with 21 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2006-01-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_finalize): Don't
leak preedit_string and preedit_attrs. (#322332, Paolo
Borelli)
* gtk/gtk.symbols:
* gtk/gtkaction.h:
* gtk/gtkaction.c (gtk_widget_get_action): New function to

View File

@ -1,5 +1,9 @@
2006-01-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_finalize): Don't
leak preedit_string and preedit_attrs. (#322332, Paolo
Borelli)
* gtk/gtk.symbols:
* gtk/gtkaction.h:
* gtk/gtkaction.c (gtk_widget_get_action): New function to

View File

@ -297,6 +297,19 @@ gtk_text_layout_finalize (GObject *object)
gtk_text_layout_free_line_display (layout, tmp_display);
}
if (layout->preedit_string)
{
g_free (layout->preedit_string);
layout->preedit_string = NULL;
}
if (layout->preedit_attrs)
{
pango_attr_list_unref (layout->preedit_attrs);
layout->preedit_attrs = NULL;
}
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}