summaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-07-02 12:54:33 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-07-02 12:54:33 +0000
commit93a6626101a75d16172b09ad5201078daf1c61b3 (patch)
tree85382023409b33ff7c59b10f3eb8e2545165ef84 /mdoc.c
parent966c1bc6fc8cf98168d9d17b82cc2e7b414d2e15 (diff)
downloadmandoc-93a6626101a75d16172b09ad5201078daf1c61b3.tar.gz
mandoc-93a6626101a75d16172b09ad5201078daf1c61b3.tar.zst
mandoc-93a6626101a75d16172b09ad5201078daf1c61b3.zip
Stash `Bf' parameters into struct mdoc_bf.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mdoc.c b/mdoc.c
index 038e0fbd..205bb485 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.155 2010/07/01 23:01:47 kristaps Exp $ */
+/* $Id: mdoc.c,v 1.156 2010/07/02 12:54:33 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -518,12 +518,21 @@ static void
mdoc_node_free(struct mdoc_node *p)
{
+ /*
+ * XXX: if these end up being problematic in terms of memory
+ * management and dereferencing freed blocks, then make them
+ * into reference-counted double-pointers.
+ */
+
if (MDOC_Bd == p->tok && MDOC_BLOCK == p->type)
if (p->data.Bd)
free(p->data.Bd);
if (MDOC_Bl == p->tok && MDOC_BLOCK == p->type)
if (p->data.Bl)
free(p->data.Bl);
+ if (MDOC_Bf == p->tok && MDOC_HEAD == p->type)
+ if (p->data.Bf)
+ free(p->data.Bf);
if (p->string)
free(p->string);