diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-20 13:43:31 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-20 13:43:31 +0000 |
commit | 9303ba60a32de21215ba72d1fa1d8457f239ee5f (patch) | |
tree | d4949feb331d1dd4350946698ab8003c5959965d | |
parent | e0d2e7718ee2ff22dc280917644a7a2d6d402ca2 (diff) | |
download | mandoc-9303ba60a32de21215ba72d1fa1d8457f239ee5f.tar.gz mandoc-9303ba60a32de21215ba72d1fa1d8457f239ee5f.tar.zst mandoc-9303ba60a32de21215ba72d1fa1d8457f239ee5f.zip |
Fixed memory leak on close.
-rw-r--r-- | html.c | 5 | ||||
-rw-r--r-- | term.c | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -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); } @@ -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); |