[mutter] util: Fix memory leak in meta_later_remove
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] util: Fix memory leak in meta_later_remove
- Date: Fri, 21 Oct 2011 19:45:00 +0000 (UTC)
commit 7f9472a58fe9605a63c0da37abe29f3c07ad54a9
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Oct 21 15:34:43 2011 -0400
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
src/core/util.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/core/util.c b/src/core/util.c
index 2d6a289..298a45c 100644
--- a/src/core/util.c
+++ b/src/core/util.c
@@ -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
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]