=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** src/usr.bin/mandoc/man.c 2009/06/23 22:05:42 1.4 --- src/usr.bin/mandoc/man.c 2009/06/23 22:31:26 1.5 *************** *** 1,4 **** ! /* $Id: man.c,v 1.4 2009/06/23 22:05:42 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: man.c,v 1.5 2009/06/23 22:31:26 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 182,187 **** --- 182,189 ---- abort(); /* NOTREACHED */ } + + p->parent->nchild++; man->last = p; *************** *** 250,255 **** --- 252,259 ---- if (p->string) free(p->string); + if (p->parent) + p->parent->nchild--; free(p); } *************** *** 263,268 **** --- 267,273 ---- if (p->next) man_node_freelist(p->next); + assert(0 == p->nchild); man_node_free(p); }