[Xfce4-commits] <xfce4-panel:devel> Fix another pointer where we peek (possibly) freed memory.

Nick Schermer noreply at xfce.org
Tue Nov 24 16:56:01 CET 2009


Updating branch refs/heads/devel
         to ee9cd722075cf9f4d7bc9323135b75b59b48ecee (commit)
       from 72fe8466fbda4b583ef6a876323ffaf8fca65646 (commit)

commit ee9cd722075cf9f4d7bc9323135b75b59b48ecee
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Nov 24 16:54:09 2009 +0100

    Fix another pointer where we peek (possibly) freed memory.

 plugins/launcher/launcher.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 46729ba..eb8d5e8 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -772,7 +772,7 @@ launcher_plugin_file_changed (GFileMonitor      *monitor,
                               GFileMonitorEvent  event_type,
                               LauncherPlugin    *plugin)
 {
-  GSList         *li;
+  GSList         *li, *lnext;
   GarconMenuItem *item;
   GFile          *item_file;
   gboolean        found;
@@ -800,8 +800,9 @@ launcher_plugin_file_changed (GFileMonitor      *monitor,
   exists = g_file_query_exists (changed_file, NULL);
 
   /* lookup the file in the menu items */
-  for (li = plugin->items, found = FALSE; !found && li != NULL; li = li->next)
+  for (li = plugin->items, found = FALSE; !found && li != NULL; li = lnext)
     {
+      lnext = li->next;
       item = GARCON_MENU_ITEM (li->data);
       item_file = garcon_menu_item_get_file (item);
       found = g_file_equal (changed_file, item_file);



More information about the Xfce4-commits mailing list