Skip to content

Commit fe9ba10

Browse files
free special char blocks alongside the parser
1 parent 061a4d8 commit fe9ba10

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/blocks.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ cmark_parser *cmark_parser_new(int options) {
162162

163163
void cmark_parser_free(cmark_parser *parser) {
164164
cmark_mem *mem = parser->mem;
165+
166+
if (parser->inline_syntax_extensions) {
167+
mem->free(parser->special_chars);
168+
mem->free(parser->skip_chars);
169+
}
170+
165171
cmark_parser_dispose(parser);
166172
cmark_strbuf_free(&parser->curline);
167173
cmark_strbuf_free(&parser->linebuf);

0 commit comments

Comments
 (0)