mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
GtkIconView: fix a memory corruption in the drag-n-drop code
You shall free with g_slice_free() what you allocate with g_slice_new(). https://bugzilla.gnome.org/show_bug.cgi?id=665338
This commit is contained in:
parent
58b1f24d6d
commit
f9c24e8f03
@ -6133,6 +6133,11 @@ drag_scroll_timeout (gpointer datap)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
drag_scroll_data_free (DragScrollData *data)
|
||||
{
|
||||
g_slice_free (DragScrollData, data);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
set_destination (GtkIconView *icon_view,
|
||||
@ -6530,7 +6535,7 @@ gtk_icon_view_drag_motion (GtkWidget *widget,
|
||||
data->device = gdk_drag_context_get_device (context);
|
||||
|
||||
icon_view->priv->scroll_timeout_id =
|
||||
gdk_threads_add_timeout_full (G_PRIORITY_DEFAULT, 50, drag_scroll_timeout, data, g_free);
|
||||
gdk_threads_add_timeout_full (G_PRIORITY_DEFAULT, 50, drag_scroll_timeout, data, (GDestroyNotify) drag_scroll_data_free);
|
||||
}
|
||||
|
||||
if (target == gdk_atom_intern_static_string ("GTK_TREE_MODEL_ROW"))
|
||||
|
Loading…
Reference in New Issue
Block a user