summaryrefslogtreecommitdiffstats
path: root/cgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cgi.c b/cgi.c
index 1145a150..c42abdca 100644
--- a/cgi.c
+++ b/cgi.c
@@ -824,6 +824,7 @@ static void
format(const struct req *req, const char *file)
{
struct mparse *mp;
+ struct mchars *mchars;
struct mdoc *mdoc;
struct man *man;
void *vp;
@@ -837,8 +838,9 @@ format(const struct req *req, const char *file)
return;
}
+ mchars = mchars_alloc();
mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_FATAL, NULL,
- req->q.manpath);
+ mchars, req->q.manpath);
rc = mparse_readfd(mp, fd, file);
close(fd);
@@ -864,10 +866,11 @@ format(const struct req *req, const char *file)
req->q.manpath, file);
pg_error_internal();
mparse_free(mp);
+ mchars_free(mchars);
return;
}
- vp = html_alloc(opts);
+ vp = html_alloc(mchars, opts);
if (NULL != mdoc)
html_mdoc(vp, mdoc);
@@ -876,6 +879,7 @@ format(const struct req *req, const char *file)
html_free(vp);
mparse_free(mp);
+ mchars_free(mchars);
free(opts);
}