Fix a crash on shutdown/reconfigure. Clean up the registered action filters properly.
authorDana Jansens <danakj@orodu.net>
Fri, 14 Oct 2011 20:42:37 +0000 (16:42 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Oct 2011 22:56:02 +0000 (18:56 -0400)
Frees the list and sets the pointer to NULL for empty list.

openbox/action_filter.c

index 0827654778796851c1989b38b57863b784b21485..feb10def1053a0954d669aed45df62103d548d93 100644 (file)
@@ -56,7 +56,8 @@ void action_filter_shutdown(gboolean reconfig)
 
     for (it = registered; it; it = g_slist_next(it))
         action_filter_unregister(it->data);
-    g_slist_free(it);
+    g_slist_free(registered);
+    registered = NULL;
 }
 
 gboolean action_filter_register(const gchar *name,