don't follow pointers after freeing them
authorDana Jansens <danakj@orodu.net>
Tue, 8 Mar 2011 21:02:14 +0000 (16:02 -0500)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Oct 2011 22:54:05 +0000 (18:54 -0400)
obt/linkbase.c

index 3e244f18e65a384905bae921ba42dd7cda933e93..09e729a62d99b9ee95685460aab56f5f36a233f0 100644 (file)
@@ -189,8 +189,8 @@ static void update(ObtWatch *w, const gchar *base_path,
                     category_remove(self, cats[i], link);
             }
 
-            list = g_slist_delete_link(list, it);
             base_entry_free(it->data);
+            list = g_slist_delete_link(list, it);
 
             if (list) {
                 /* this will free 'id' */
@@ -225,8 +225,8 @@ static void update(ObtWatch *w, const gchar *base_path,
                     category_remove(self, cats[i], link);
             }
 
-            list = g_slist_delete_link(list, it);
             base_entry_free(it->data);
+            list = g_slist_delete_link(list, it);
             /* this will put the modified list into the hash table */
             add = TRUE;
         }