Free parse tree when deleting parser.
diff --git a/Parser/parser.c b/Parser/parser.c
index e0b3530..294c534 100644
--- a/Parser/parser.c
+++ b/Parser/parser.c
@@ -96,8 +96,6 @@
 	ps->p_grammar = g;
 	ps->p_tree = newnode(start);
 	if (ps->p_tree == NULL) {
-		if (ps->p_tree != NULL)
-			DEL(ps->p_tree); /* XXX freeing a node!?! */
 		DEL(ps);
 		return NULL;
 	}
@@ -110,6 +108,9 @@
 delparser(ps)
 	parser_state *ps;
 {
+	/* NB If you want to save the parse tree,
+	   you must set p_tree to NULL before calling delparser! */
+	freenode(ps->p_tree);
 	DEL(ps);
 }