X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fkeyboard%2Ftree.c;h=896f77bb4cc1382f4390f7ff26aa84712812e7b1;hb=3fab044f347fbfdad27492802fe3e3628ff915da;hp=ab528376dfacb6e9a3df5c4dfea83fa730f6bcff;hpb=4bcd03b2d0904e2b5443a2383b66055422240255;p=chaz%2Fopenbox diff --git a/plugins/keyboard/tree.c b/plugins/keyboard/tree.c index ab528376..896f77bb 100644 --- a/plugins/keyboard/tree.c +++ b/plugins/keyboard/tree.c @@ -11,10 +11,13 @@ void tree_destroy(KeyBindingTree *tree) c = tree->first_child; if (c == NULL) { GList *it; + GSList *sit; for (it = tree->keylist; it != NULL; it = it->next) g_free(it->data); g_list_free(tree->keylist); - action_free(tree->action); + for (it = tree->actions; it != NULL; it = it->next) + action_free(it->data); + g_slist_free(tree->actions); } g_free(tree); tree = c; @@ -31,8 +34,7 @@ KeyBindingTree *tree_build(GList *keylist) for (it = g_list_last(keylist); it != NULL; it = it->prev) { p = ret; - ret = g_new(KeyBindingTree, 1); - ret->next_sibling = NULL; + ret = g_new0(KeyBindingTree, 1); if (p == NULL) { GList *it;