From 96cdc9c4eb9318299b3382026d1dbac1d5941f17 Mon Sep 17 00:00:00 2001
From: Jasper St. Pierre <jstpierre@mecheye.net>
Date: Mon, 18 Jun 2012 10:22:29 +0000
Subject: app-system: Use g_slist_free_full

https://bugzilla.gnome.org/show_bug.cgi?id=658176
---
Index: gnome-shell-3.4.2/src/shell-app-system.c
===================================================================
--- gnome-shell-3.4.2.orig/src/shell-app-system.c	2013-01-15 00:14:38.335087898 +0100
+++ gnome-shell-3.4.2/src/shell-app-system.c	2013-01-15 00:14:38.331087862 +0100
@@ -128,8 +128,7 @@
   g_hash_table_destroy (priv->id_to_app);
   g_hash_table_destroy (priv->setting_id_to_app);
 
-  g_slist_foreach (priv->known_vendor_prefixes, (GFunc)g_free, NULL);
-  g_slist_free (priv->known_vendor_prefixes);
+  g_slist_free_full (priv->known_vendor_prefixes, g_free);
   priv->known_vendor_prefixes = NULL;
 
   G_OBJECT_CLASS (shell_app_system_parent_class)->finalize (object);
@@ -314,8 +313,7 @@
 
   g_assert (tree == self->priv->apps_tree);
 
-  g_slist_foreach (self->priv->known_vendor_prefixes, (GFunc)g_free, NULL);
-  g_slist_free (self->priv->known_vendor_prefixes);
+  g_slist_free_full (self->priv->known_vendor_prefixes, g_free);
   self->priv->known_vendor_prefixes = NULL;
 
   if (!gmenu_tree_load_sync (self->priv->apps_tree, &error))
@@ -754,8 +752,7 @@
                            &prefix_results,
                            &substring_results);
     }
-  g_slist_foreach (normalized_terms, (GFunc)g_free, NULL);
-  g_slist_free (normalized_terms);
+  g_slist_free_full (normalized_terms, g_free);
 
   return sort_and_concat_results (self, prefix_results, substring_results);
 
@@ -808,8 +805,7 @@
                            &prefix_results,
                            &substring_results);
     }
-  g_slist_foreach (normalized_terms, (GFunc)g_free, NULL);
-  g_slist_free (normalized_terms);
+  g_slist_free_full (normalized_terms, g_free);
 
   /* Note that a shorter term might have matched as a prefix, but
      when extended only as a substring, so we have to redo the
