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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Aug 30 13:52:10 EEST 2007
Author: jobi
Date: 2007-08-30 13:52:08 +0300 (Thu, 30 Aug 2007)
New Revision: 13475

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c
   projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c
   projects/haf/trunk/hildon-desktop/src/hd-desktop.c
   projects/haf/trunk/hildon-desktop/src/hd-select-plugins-dialog.c
Log:

2007-08-30 Johan Bilien  <johan.bilien at nokia.com>

	* src/hd-desktop.c: fixed the leaks of some strings
	* src/hd-select-plugins-dialog.c: fixed the leak of a string
	and a keyfile
	* libhildondesktop/hildon-home-area.c: fixed the leaks
	of a list and a string
	* libhildonwm/hd-wm.c: fixed the leaks of some X atoms
	Fixes: NB#67175



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-08-30 10:45:12 UTC (rev 13474)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-08-30 10:52:08 UTC (rev 13475)
@@ -1,3 +1,13 @@
+2007-08-30 Johan Bilien  <johan.bilien at nokia.com>
+
+	* src/hd-desktop.c: fixed the leaks of some strings
+	* src/hd-select-plugins-dialog.c: fixed the leak of a string
+	and a keyfile
+	* libhildondesktop/hildon-home-area.c: fixed the leaks
+	of a list and a string
+	* libhildonwm/hd-wm.c: fixed the leaks of some X atoms
+	Fixes: NB#67175
+
 2007-08-30  Lucas Rocha  <lucas.rocha at nokia.com>
 
 	* libhildondesktop/hildon-desktop-popup-menu.[ch]
@@ -32,9 +42,11 @@
 
 2007-08-29  Karoliina Salminen  <karoliina.t.salminen at nokia.com>
 
-	* Fixed signedness problem on libhildonmenu.c on line 1013: added cast to empty
-	string to get rid of warning (which is treated as error) which blocked compilation
-	on Ubuntu Gutsy. This fixes NB#67207.
+	* Fixed signedness problem on libhildonmenu.c on line 1013: added
+	cast to empty
+	string to get rid of warning (which is treated as error) which
+	blocked compilation
+	on Ubuntu Gutsy. Fixes: NB#67207.
 
 2007-08-29  Lucas Rocha  <lucas.rocha at nokia.com>
 

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c	2007-08-30 10:45:12 UTC (rev 13474)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-area.c	2007-08-30 10:52:08 UTC (rev 13475)
@@ -1605,13 +1605,11 @@
   GdkRectangle r = {0};
   gint x, y;
   gint padding;
-  const gchar *name;
 
   gtk_container_child_get (GTK_CONTAINER (widget->parent), widget,
                            "x", &x,
                            "y", &y,
                            NULL);
-  g_object_get (widget, "id", &name, NULL);
 
   g_object_get (widget->parent,
                 "applet-padding", &padding,
@@ -1750,6 +1748,7 @@
   g_list_foreach (region, (GFunc)g_free, NULL);
   g_list_free (region);
 
+  g_list_free (priv->to_add);
   priv->to_add = NULL;
 
 }
@@ -1925,11 +1924,9 @@
     }
 
   else
-    {
-      ret = fwrite (buffer, buffer_size, 1, file);
+    ret = fwrite (buffer, buffer_size, 1, file);
 
-      g_free (buffer);
-    }
+  g_free (buffer);
 
   if (file)
     fclose (file);

Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c	2007-08-30 10:45:12 UTC (rev 13474)
+++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c	2007-08-30 10:52:08 UTC (rev 13475)
@@ -1956,7 +1956,11 @@
 	hd_wm_desktop_set_x_window (HD_WM_DESKTOP (hd_wm_get_home_info (hdwm)), allwins.wins[i]);
 	break;
       }	      
+
+      XFree (wm_type_atom);
     }
+
+    XFree (allwins.wins);
   }
 
   /* FIXME: We (or MB!) should probably keep a copy of ordered window list

Modified: projects/haf/trunk/hildon-desktop/src/hd-desktop.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-desktop.c	2007-08-30 10:45:12 UTC (rev 13474)
+++ projects/haf/trunk/hildon-desktop/src/hd-desktop.c	2007-08-30 10:52:08 UTC (rev 13475)
@@ -324,9 +324,9 @@
 {
   gchar *config_file_path;
   gchar *user_config_file_path;
-        
+
   config_file_path = g_build_filename (g_get_home_dir (),
-                                       HD_DESKTOP_CONFIG_USER_PATH, 
+                                       HD_DESKTOP_CONFIG_USER_PATH,
                                        config_file,
                                        NULL);
 
@@ -367,7 +367,7 @@
     g_free (user_config_file_path);
   }
 
-  return config_file_path; 
+  return config_file_path;
 }
 
 static GList *
@@ -943,7 +943,7 @@
       continue;
     }
 
-    container_config = hd_desktop_get_conf_file_path (container_config_file); 
+    container_config = hd_desktop_get_conf_file_path (container_config_file);
 
     if (container_config == NULL)
     {
@@ -1277,6 +1277,9 @@
 
     g_free (type);
     g_free (plugin_dir);
+    g_free (container_config);
+    g_free (container_config_file);
+    g_free (policy_module);
     g_list_foreach (plugin_list, (GFunc) g_free , NULL);
     g_list_free (plugin_list);
   }

Modified: projects/haf/trunk/hildon-desktop/src/hd-select-plugins-dialog.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-select-plugins-dialog.c	2007-08-30 10:45:12 UTC (rev 13474)
+++ projects/haf/trunk/hildon-desktop/src/hd-select-plugins-dialog.c	2007-08-30 10:52:08 UTC (rev 13475)
@@ -180,12 +180,15 @@
                                G_KEY_FILE_NONE,
                                &error);
 
+    g_free (desktop_path);
+
     if (error)
     {
       g_warning ("Error loading plugin configuration file: %s", error->message);
 
       g_error_free (error);
       g_dir_close (dir);
+      g_key_file_free (keyfile);
 
       return NULL;
     }
@@ -202,6 +205,7 @@
 
       g_error_free (error);
       g_dir_close (dir);
+      g_key_file_free (keyfile);
 
       return NULL;
     }
@@ -221,6 +225,7 @@
     g_free (name);
   }
 
+  g_key_file_free (keyfile);
   g_dir_close (dir);
   return store;
 }


More information about the maemo-commits mailing list