[maemo-commits] [maemo-commits] r14479 - in projects/haf/trunk/hildon-desktop: . libhildondesktop libhildonwm src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Oct 17 16:46:10 EEST 2007
Author: lucasr
Date: 2007-10-17 16:46:08 +0300 (Wed, 17 Oct 2007)
New Revision: 14479

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c
   projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c
   projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c
Log:
2007-10-17  Lucas Rocha  <lucas.rocha at nokia.com>

	* src/hd-applications-menu.c (hd_applications_menu_activate_category):
	fix an invalid read by adding a weak pointer to the internal static
	variable that points to the last selected item. Fixes: NB#73505.
	* libhildondesktop/hildon-desktop-panel-expandable.c
	(hildon_desktop_desktop_panel_expandable_cremove): fix a leak by
	freeing an temporary list.
	* libhildonwm/hd-wm.c (hd_wm_activate_service): fix memory leak.


Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-10-17 13:36:32 UTC (rev 14478)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-10-17 13:46:08 UTC (rev 14479)
@@ -1,3 +1,13 @@
+2007-10-17  Lucas Rocha  <lucas.rocha at nokia.com>
+
+	* src/hd-applications-menu.c (hd_applications_menu_activate_category):
+	fix an invalid read by adding a weak pointer to the internal static
+	variable that points to the last selected item. Fixes: NB#73505.
+	* libhildondesktop/hildon-desktop-panel-expandable.c
+	(hildon_desktop_desktop_panel_expandable_cremove): fix a leak by
+	freeing an temporary list.
+	* libhildonwm/hd-wm.c (hd_wm_activate_service): fix memory leak.
+
 2007-10-17  Johan Bilien  <johan.bilien at nokia.com>
 
 	* libhildondesktop/hildon-desktop-home-item.c: reverted activating

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c	2007-10-17 13:36:32 UTC (rev 14478)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c	2007-10-17 13:46:08 UTC (rev 14479)
@@ -515,6 +515,8 @@
     for (l = mylist; l ; l = l->next)	  
        sb_debug ("name: %s",HILDON_DESKTOP_ITEM (l->data)->id);
 
+  g_list_free (mylist);
+
   if (widget == panel->priv->arrow)
   {	  
     gtk_container_remove (GTK_CONTAINER (container), widget);
@@ -540,7 +542,6 @@
   else
   if (widget->parent == GTK_WIDGET (panel->priv->extension_table))
     gtk_container_remove (GTK_CONTAINER (panel->priv->extension_table), widget);
-
 }
 
 static void 

Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c	2007-10-17 13:36:32 UTC (rev 14478)
+++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c	2007-10-17 13:46:08 UTC (rev 14479)
@@ -2188,6 +2188,7 @@
   g_free (app_name);  
   g_free (startup_id);
   g_free (message);
+  g_free (launchee_name);
 }
 
 void 

Modified: projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c	2007-10-17 13:36:32 UTC (rev 14478)
+++ projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c	2007-10-17 13:46:08 UTC (rev 14479)
@@ -386,7 +386,7 @@
 
   GList *sub_items = NULL;
   gboolean replaced = FALSE;
-  
+
   if (GTK_IS_MENU_ITEM (last_selected_item))
   {
     sub_items = (GList *) g_object_get_data (G_OBJECT (last_selected_item),
@@ -408,6 +408,8 @@
     }
 
     last_selected_item = item;
+
+    g_object_add_weak_pointer (G_OBJECT (item), (void *) &last_selected_item);
  
     replaced = TRUE;
  


More information about the maemo-commits mailing list