[BUG] Leak in GtkCList ?




In gtkclist.c / gtk_clist_drag_data_get() :

static void  
gtk_clist_drag_data_get (GtkWidget        *widget,
			 GdkDragContext   *context,
			 GtkSelectionData *selection_data,
			 guint             info,
			 guint             time)
{

[...]

      if (info)
	{
	  GtkCListCellInfo *ret_info;

	  ret_info = g_new (GtkCListCellInfo, 1);
	  ret_info->row = info->row;
	  ret_info->column = info->column;

	  gtk_selection_data_set (selection_data,
				  selection_data->target,
				  GTK_TYPE_POINTER,
				  (guchar *) ret_info,
				  sizeof (GtkCListCellInfo));
	}

[...]

}

However, gtk_selection_data_set() creates its own copy of the data it
is passed (e.g. ret_info), so unless I'm missing something, there
should be a

	g_free(ret_info)

after the call to gtk_selection_data_set().

-- 
					Guillaume.
					http://www.worldnet.fr/~glaurent



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]