eliminate leak from alliance.test

This commit is contained in:
Enno Rehling 2016-09-07 17:50:51 +02:00
parent 9499919387
commit 4115bff79b
1 changed files with 6 additions and 8 deletions

View File

@ -288,14 +288,12 @@ static void perform_join(void)
static syntaxtree * build_syntax(void) {
syntaxtree *slang, *stree = stree_create();
for (slang = stree; slang; slang = slang->next) {
struct tnode *leaf = 0;
add_command(&leaf, LOC(slang->lang, alliance_kwd[ALLIANCE_KICK]), &cmd_kick);
add_command(&leaf, LOC(slang->lang, alliance_kwd[ALLIANCE_LEAVE]), &cmd_leave);
add_command(&leaf, LOC(slang->lang, alliance_kwd[ALLIANCE_TRANSFER]), &cmd_transfer);
add_command(&leaf, LOC(slang->lang, alliance_kwd[ALLIANCE_NEW]), &cmd_new);
add_command(&leaf, LOC(slang->lang, alliance_kwd[ALLIANCE_INVITE]), &cmd_invite);
add_command(&leaf, LOC(slang->lang, alliance_kwd[ALLIANCE_JOIN]), &cmd_join);
slang->root = leaf;
stree_add(slang, LOC(slang->lang, alliance_kwd[ALLIANCE_KICK]), &cmd_kick);
stree_add(slang, LOC(slang->lang, alliance_kwd[ALLIANCE_LEAVE]), &cmd_leave);
stree_add(slang, LOC(slang->lang, alliance_kwd[ALLIANCE_TRANSFER]), &cmd_transfer);
stree_add(slang, LOC(slang->lang, alliance_kwd[ALLIANCE_NEW]), &cmd_new);
stree_add(slang, LOC(slang->lang, alliance_kwd[ALLIANCE_INVITE]), &cmd_invite);
stree_add(slang, LOC(slang->lang, alliance_kwd[ALLIANCE_JOIN]), &cmd_join);
}
return stree;
}