From: Dana Jansens Date: Tue, 8 Mar 2011 21:02:14 +0000 (-0500) Subject: don't follow pointers after freeing them X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=7dfc266ffad042f1ed2b4a47e2f52ca8002035fd;p=dana%2Fopenbox.git don't follow pointers after freeing them --- diff --git a/obt/linkbase.c b/obt/linkbase.c index 3e244f18..09e729a6 100644 --- a/obt/linkbase.c +++ b/obt/linkbase.c @@ -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; }