diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-02 12:54:33 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-02 12:54:33 +0000 |
commit | 93a6626101a75d16172b09ad5201078daf1c61b3 (patch) | |
tree | 85382023409b33ff7c59b10f3eb8e2545165ef84 /mdoc.c | |
parent | 966c1bc6fc8cf98168d9d17b82cc2e7b414d2e15 (diff) | |
download | mandoc-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.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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); |