aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-09-20 13:43:31 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-09-20 13:43:31 +0000
commit9303ba60a32de21215ba72d1fa1d8457f239ee5f (patch)
treed4949feb331d1dd4350946698ab8003c5959965d
parente0d2e7718ee2ff22dc280917644a7a2d6d402ca2 (diff)
downloadmandoc-9303ba60a32de21215ba72d1fa1d8457f239ee5f.tar.gz
mandoc-9303ba60a32de21215ba72d1fa1d8457f239ee5f.tar.zst
mandoc-9303ba60a32de21215ba72d1fa1d8457f239ee5f.zip
Fixed memory leak on close.
-rw-r--r--html.c5
-rw-r--r--term.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/html.c b/html.c
index 19297805..4fbec205 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.35 2009/09/20 11:05:22 kristaps Exp $ */
+/* $Id: html.c,v 1.36 2009/09/20 13:43:31 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -402,6 +402,9 @@ html_free(void *p)
SLIST_REMOVE_HEAD(&h->stack, entry);
free(tag);
}
+
+ if (h->symtab)
+ chars_free(h->symtab);
free(h);
}
diff --git a/term.c b/term.c
index d3c37f70..f5f18c45 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.101 2009/09/17 07:41:28 kristaps Exp $ */
+/* $Id: term.c,v 1.102 2009/09/20 13:43:31 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -90,7 +90,7 @@ term_free(struct termp *p)
if (p->buf)
free(p->buf);
- if (TERMENC_ASCII == p->enc && p->symtab)
+ if (p->symtab)
chars_free(p->symtab);
free(p);