aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/inlines.c9
1 files changed, 9 insertions, 0 deletions
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;
}