diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-01-19 17:53:54 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-01-19 17:53:54 +0000 |
commit | ae576e093a089cd4c49543b17927bbc7bb72fd12 (patch) | |
tree | feb3e41e76ce2702c8d8d5467e6122b3dcf7b54c /mdoc.c | |
parent | 2e32d8081f19a0adc0f1c4091cc0e6720b1a24fe (diff) | |
download | mandoc-ae576e093a089cd4c49543b17927bbc7bb72fd12.tar.gz |
Plugged memory leak in meta free.
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -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); } |