summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-01-19 17:53:54 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-01-19 17:53:54 +0000
commitae576e093a089cd4c49543b17927bbc7bb72fd12 (patch)
treefeb3e41e76ce2702c8d8d5467e6122b3dcf7b54c /mdoc.c
parent2e32d8081f19a0adc0f1c4091cc0e6720b1a24fe (diff)
downloadmandoc-ae576e093a089cd4c49543b17927bbc7bb72fd12.tar.gz
Plugged memory leak in meta free.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/mdoc.c b/mdoc.c
index 53c91c37..ffacbedf 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -228,27 +228,20 @@ mdoc_meta(struct mdoc *mdoc)
void
-mdoc_meta_free(struct mdoc *mdoc)
+mdoc_free(struct mdoc *mdoc)
{
+ if (mdoc->first)
+ mdoc_node_freelist(mdoc->first);
+ if (mdoc->htab)
+ mdoc_tokhash_free(mdoc->htab);
if (mdoc->meta.title)
free(mdoc->meta.title);
if (mdoc->meta.os)
free(mdoc->meta.os);
if (mdoc->meta.name)
free(mdoc->meta.name);
-}
-
-void
-mdoc_free(struct mdoc *mdoc)
-{
-
- if (mdoc->first)
- mdoc_node_freelist(mdoc->first);
- if (mdoc->htab)
- mdoc_tokhash_free(mdoc->htab);
-
free(mdoc);
}