=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_html.c,v retrieving revision 1.214 retrieving revision 1.215 diff -c -r1.214 -r1.215 *** src/usr.bin/mandoc/mdoc_html.c 2020/04/18 20:28:46 1.214 --- src/usr.bin/mandoc/mdoc_html.c 2020/04/19 15:15:54 1.215 *************** *** 1,4 **** ! /* $OpenBSD: mdoc_html.c,v 1.214 2020/04/18 20:28:46 schwarze Exp $ */ /* * Copyright (c) 2014-2020 Ingo Schwarze * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons --- 1,4 ---- ! /* $OpenBSD: mdoc_html.c,v 1.215 2020/04/19 15:15:54 schwarze Exp $ */ /* * Copyright (c) 2014-2020 Ingo Schwarze * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons *************** *** 693,700 **** { char *id; ! if ((id = html_make_id(n, 1)) != NULL) print_tagq(h, print_otag(h, TAG_MARK, "i", id)); return 0; } --- 693,702 ---- { char *id; ! if ((id = html_make_id(n, 1)) != NULL) { print_tagq(h, print_otag(h, TAG_MARK, "i", id)); + free(id); + } return 0; } *************** *** 1209,1214 **** --- 1211,1218 ---- static int mdoc_pp_pre(MDOC_ARGS) { + char *id; + if (n->flags & NODE_NOFILL) { print_endline(h); if (n->flags & NODE_ID) *************** *** 1219,1226 **** } } else { html_close_paragraph(h); ! print_otag(h, TAG_P, "ci", "Pp", ! n->flags & NODE_ID ? html_make_id(n, 1) : NULL); } return 0; } --- 1223,1231 ---- } } else { html_close_paragraph(h); ! id = n->flags & NODE_ID ? html_make_id(n, 1) : NULL; ! print_otag(h, TAG_P, "ci", "Pp", id); ! free(id); } return 0; }