Commit 0672f27c0c31e61f700f1987fdb6b4eb84f9e348

Martin Mitas 2024-01-21T11:45:02

md_process_table_row: Remove not needed freeing of ptr_stack. This is already handled universally in md_process_normal_block_contents() which is called from md_process_table_row() via md_process_table_cell().

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/md4c.c b/src/md4c.c
index 6425d0c..0907286 100644
--- a/src/md4c.c
+++ b/src/md4c.c
@@ -4596,11 +4596,6 @@ md_process_table_row(MD_CTX* ctx, MD_BLOCKTYPE cell_type, OFF beg, OFF end,
 abort:
     free(pipe_offs);
 
-    /* Free any temporary memory blocks stored within some dummy marks. */
-    for(i = ctx->ptr_stack.top; i >= 0; i = ctx->marks[i].next)
-        free(md_mark_get_ptr(ctx, i));
-    ctx->ptr_stack.top = -1;
-
     ctx->table_cell_boundaries_head = -1;
     ctx->table_cell_boundaries_tail = -1;