summaryrefslogtreecommitdiffstats
path: root/man.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-06-18 20:46:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-06-18 20:46:19 +0000
commit02772d7cbebdade86dabcbbc9d19e72db2bd0b43 (patch)
treecd69db8c6dcccdbdc0b519f7d88aaacc22dbac4d /man.c
parente2d8679f361643c8410c69f218268085075bc428 (diff)
downloadmandoc-02772d7cbebdade86dabcbbc9d19e72db2bd0b43.tar.gz
Added nchild decrement in libman (not used, but better in than forgotten).
Added nchild to libmdoc, deprecated count() functions in validator.
Diffstat (limited to 'man.c')
-rw-r--r--man.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/man.c b/man.c
index 3eb24a81..803c9ca4 100644
--- a/man.c
+++ b/man.c
@@ -252,6 +252,8 @@ man_node_free(struct man_node *p)
if (p->string)
free(p->string);
+ if (p->parent)
+ p->parent->nchild--;
free(p);
}
@@ -265,6 +267,7 @@ man_node_freelist(struct man_node *p)
if (p->next)
man_node_freelist(p->next);
+ assert(0 == p->nchild);
man_node_free(p);
}