util: Fix memory leak in meta_later_remove

We never destroy the later list that's added by meta_later_add.

==4289== 16 bytes in 1 blocks are definitely lost in loss record 1,632 of 7,258
==4289==    at 0x4C2640D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4289==    by 0x5178D9F: standard_malloc (gmem.c:88)
==4289==    by 0x5178E37: g_malloc (gmem.c:164)
==4289==    by 0x51924B5: g_slice_alloc (gslice.c:842)
==4289==    by 0x5194521: g_slist_insert_sorted_real (gslist.c:900)
==4289==    by 0x519465A: g_slist_insert_sorted (gslist.c:957)
==4289==    by 0x4EA609A: meta_later_add (util.c:876)
==4289==    by 0x4E9C330: meta_screen_queue_workarea_recalc (screen.c:2640)
==4289==    by 0x4E9A360: update_num_workspaces (screen.c:1646)
==4289==    by 0x4E99026: meta_screen_new (screen.c:924)
==4289==    by 0x4E7AB51: meta_display_open (display.c:803)
==4289==    by 0x4E9168E: meta_run (main.c:552)

https://bugzilla.gnome.org/show_bug.cgi?id=642652
This commit is contained in:
Jasper St. Pierre 2011-10-21 15:34:43 -04:00
parent 3599917123
commit 7f9472a58f

View File

@ -916,7 +916,7 @@ meta_later_remove (guint later_id)
MetaLater *later = l->data;
if (later->id == later_id)
{
laters = g_slist_remove_link (laters, l);
laters = g_slist_delete_link (laters, l);
/* If this was a "repaint func" later, we just let the
* repaint func run and get removed
*/