path.c: use xmalloc() in add_to_trie()