do not leak list.

2007-12-21  Paolo Borelli  <pborelli@katamail.com>

	* src/core/core.c (meta_invalidate_default_icons): do not leak list.

	* src/core/edge-resistance.c 
	(meta_display_compute_resistance_and_snapping_edges): ditto.

	* src/core/workspace.c (meta_workspace_index): small cleanup in list
	handling.


svn path=/trunk/; revision=3495
This commit is contained in:
Paolo Borelli 2007-12-21 19:56:07 +00:00 committed by Paolo Borelli
parent 5dc41f8c94
commit b9e1a9159e
4 changed files with 21 additions and 20 deletions

View File

@ -1,3 +1,13 @@
2007-12-21 Paolo Borelli <pborelli@katamail.com>
* src/core/core.c (meta_invalidate_default_icons): do not leak list.
* src/core/edge-resistance.c
(meta_display_compute_resistance_and_snapping_edges): ditto.
* src/core/workspace.c (meta_workspace_index): small cleanup in list
handling.
2007-12-19 Havoc Pennington <hp@redhat.com>
* src/core/display.c (meta_display_open): fix a third warning

View File

@ -718,19 +718,18 @@ meta_core_increment_event_serial (Display *xdisplay)
void
meta_invalidate_default_icons (void)
{
GSList *displays, *windows;
GSList *displays;
for (displays = meta_displays_list ();
displays != NULL;
displays = displays->next)
{
GSList *windows, *l;
for (windows = meta_display_list_windows (displays->data);
windows != NULL;
windows = windows->next)
windows = meta_display_list_windows (displays->data);
for (l = windows; l != NULL; l = l->next)
{
MetaWindow *window = (MetaWindow*)windows->data;
MetaWindow *window = (MetaWindow*)l->data;
if (window->icon_cache.origin == USING_FALLBACK_ICON)
{

View File

@ -1091,6 +1091,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display)
/*
* 4th: Free the extra memory not needed and sort the list
*/
g_list_free (stacked_windows);
/* Free the memory used by the obscuring windows/docks lists */
g_slist_free (window_stacking);
/* FIXME: Shouldn't there be a helper function to make this one line of code

View File

@ -357,23 +357,14 @@ meta_workspace_activate (MetaWorkspace *workspace,
int
meta_workspace_index (MetaWorkspace *workspace)
{
GList *tmp;
int i;
int ret;
i = 0;
tmp = workspace->screen->workspaces;
while (tmp != NULL)
{
if (tmp->data == workspace)
return i;
ret = g_list_index (workspace->screen->workspaces, workspace);
++i;
tmp = tmp->next;
}
if (ret < 0)
meta_bug ("Workspace does not exist to index!\n");
meta_bug ("Workspace does not exist to index!\n");
return -1; /* compiler warnings */
return ret;
}
/* get windows contained on workspace, including workspace->windows