Commit 084a0dec27cce78169d58956da753023cb060480

Thomas de Grivel 2024-01-30T09:44:47

str_parse_eval: clean

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/libc3/str.c b/libc3/str.c
index ff4f2ab..5947ccf 100644
--- a/libc3/str.c
+++ b/libc3/str.c
@@ -509,6 +509,12 @@ bool str_parse_eval (const s_str *str, s_tag *dest)
     }
   }
   *dest = tmp;
+  while (list_start) {
+    list = list_next(list_start);
+    free(list_start);
+    list_start = list;
+  }
+  buf_clean(&out_buf);
   return true;
  restore:
   list_delete_all(list_start);