aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoruser <Knagis@users.noreply.github.com>2014-10-09 07:44:11 -0400
committeruser <Knagis@users.noreply.github.com>2014-10-09 07:44:11 -0400
commitc667b141b84ff73f02202cf7debf37d60e9b3918 (patch)
treea62d807679d5933614f3e325a4a1c4c70fa9d0a7 /src
parentde80806ef51ce89667ebc3f3d1f58bf55d2b370e (diff)
After inline parsing free any remaining InlineStack instances.
Diffstat (limited to 'src')
-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;
}