[maemo-commits] [maemo-commits] r18453 - in projects/haf/trunk/libmatchbox2: . debian matchbox/core

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu May 21 16:58:00 EEST 2009
Author: kihamala
Date: 2009-05-21 16:57:59 +0300 (Thu, 21 May 2009)
New Revision: 18453

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/debian/changelog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
Log:
plug a leak in mb_wm_client_destroy


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-05-21 08:49:57 UTC (rev 18452)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-05-21 13:57:59 UTC (rev 18453)
@@ -1,3 +1,8 @@
+2009-05-21  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
+
+	* matchbox/core/mb-wm-client.c (mb_wm_client_destroy): Free decor list
+	after unreffing the objects in the list.
+
 2009-05-20  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
 	* matchbox/core/mb-wm-layout.c (mb_wm_layout_real_layout_free): Stop

Modified: projects/haf/trunk/libmatchbox2/debian/changelog
===================================================================
--- projects/haf/trunk/libmatchbox2/debian/changelog	2009-05-21 08:49:57 UTC (rev 18452)
+++ projects/haf/trunk/libmatchbox2/debian/changelog	2009-05-21 13:57:59 UTC (rev 18453)
@@ -3,6 +3,7 @@
   Kimmo:
   * Fixes: NB#117392 - Window manager resizes/rotates applications that aren't
     visible and don't support rotation
+  * Plug a memory leak in mb_wm_client_destroy.
 
   Thomas:
   * Fixes: NB#117562 - _GNU_SOURCE defined in public header file

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-05-21 08:49:57 UTC (rev 18452)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c	2009-05-21 13:57:59 UTC (rev 18453)
@@ -46,7 +46,7 @@
 {
   MBWindowManagerClient * client = MB_WM_CLIENT(obj);
   MBWindowManager       * wm = client->wmref;
-  MBWMList              * l = client->decor;
+  MBWMList              * l;
 
   if (client->sig_theme_change_id)
     mb_wm_object_signal_disconnect (MB_WM_OBJECT (wm),
@@ -72,10 +72,13 @@
 
   mb_wm_object_unref (MB_WM_OBJECT (client->window));
 
-  while (l)
+  for (l = client->decor; l; l = l->next)
+    mb_wm_object_unref (l->data);
+
+  if (client->decor)
     {
-      mb_wm_object_unref (l->data);
-      l = l->next;
+      mb_wm_util_list_free (client->decor);
+      client->decor = NULL;
     }
 
   if (client->transient_for)


More information about the maemo-commits mailing list