From c667b141b84ff73f02202cf7debf37d60e9b3918 Mon Sep 17 00:00:00 2001 From: user Date: Thu, 9 Oct 2014 07:44:11 -0400 Subject: After inline parsing free any remaining InlineStack instances. --- src/inlines.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/inlines.c b/src/inlines.c index 56e4eba..e0c1441 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -724,6 +724,15 @@ extern node_inl* parse_inlines_while(subject* subj, int (*f)(subject*)) node_inl* last = NULL; while ((*f)(subj) && parse_inline(subj, first, &last)) { } + + inline_stack* istack = subj->last_emphasis; + inline_stack* temp; + while (istack != NULL) { + temp = istack->previous; + free(istack); + istack = temp; + } + return result; } -- cgit v1.2.3