=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/cgi.c,v retrieving revision 1.38 retrieving revision 1.39 diff -c -r1.38 -r1.39 *** src/usr.bin/mandoc/cgi.c 2014/10/07 18:20:42 1.38 --- src/usr.bin/mandoc/cgi.c 2014/10/28 17:35:42 1.39 *************** *** 1,4 **** ! /* $OpenBSD: cgi.c,v 1.38 2014/10/07 18:20:42 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: cgi.c,v 1.39 2014/10/28 17:35:42 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze *************** *** 823,828 **** --- 823,829 ---- format(const struct req *req, const char *file) { struct mparse *mp; + struct mchars *mchars; struct mdoc *mdoc; struct man *man; void *vp; *************** *** 836,843 **** return; } mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_FATAL, NULL, ! req->q.manpath); rc = mparse_readfd(mp, fd, file); close(fd); --- 837,845 ---- return; } + mchars = mchars_alloc(); mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_FATAL, NULL, ! mchars, req->q.manpath); rc = mparse_readfd(mp, fd, file); close(fd); *************** *** 863,872 **** req->q.manpath, file); pg_error_internal(); mparse_free(mp); return; } ! vp = html_alloc(opts); if (NULL != mdoc) html_mdoc(vp, mdoc); --- 865,875 ---- req->q.manpath, file); pg_error_internal(); mparse_free(mp); + mchars_free(mchars); return; } ! vp = html_alloc(mchars, opts); if (NULL != mdoc) html_mdoc(vp, mdoc); *************** *** 875,880 **** --- 878,884 ---- html_free(vp); mparse_free(mp); + mchars_free(mchars); free(opts); }