Commit d9b54ec4f3e10651887c6d157f5b1f3a7c4d2348

Thomas de Grivel 2024-09-08T17:26:34

clean tuple in markdown.c

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/markdown/markdown.c b/markdown/markdown.c
index 162b886..5c5ec70 100644
--- a/markdown/markdown.c
+++ b/markdown/markdown.c
@@ -95,6 +95,8 @@ s_list ** markdown_titles (const s_str *markdown, s_list **dest)
   md_parse(markdown->ptr.pchar, markdown->size,
            &parser, &tuple);
   *dest = tuple_list->data.list;
+  tuple_list->data.list = NULL;
+  tuple_clean(&tuple);
   return dest;
 }