GNOME Bugzilla – Bug 306095
In pygtk 2.6.x calling free() on GtkIconInfo object causes a double free or corruption error.
Last modified: 2005-07-30 15:07:04 UTC
Version details: python 2.3.5, pygtk 2.6.1, gtk 2.6.7 Distribution/Version: gentoo x86 2005 python code showing the problem: >>>import gtk >>>theme = gtk.icon_theme_get_default() >>>info = theme.lookup_icon('mime-text', 48, 0) #could be any icon >>>info.free() >>>info.free() #causes double free error and python aborts. In practice, a single call to free() will cause the problem because at some point python will free the info object itself.
Seems like the free() method is not needed and should not be used. This likely applies to other boxed types as well e.g. IconSource.
fixed in cvs: * gtk/gtk.override (_wrap_gtk_icon_source_free) (_wrap_gtk_requisition_free, _wrap_gtk_tree_iter_free) (_wrap_gtk_tree_row_reference_free, _wrap_gtk_border_free): Override free() methods of boxed types to make them do nothing and issue a deprecation warning. Fixes Bug 306095: In pygtk 2.6.x calling free() on GtkIconInfo object causes a double free or corruption error.