Commit 9a773cc1c29d6e82249ecd30eb87dc84b5f2425c

Baptiste 2024-08-06T15:48:30

fix memleak in str_parse_eval

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libkc3/str.c b/libkc3/str.c
index 016b5ec..4c3bbb5 100644
--- a/libkc3/str.c
+++ b/libkc3/str.c
@@ -663,7 +663,7 @@ bool str_parse_eval (const s_str *str, s_tag *dest)
         goto next;
       tag_init_call_cast(&tag, &g_sym_Str);
       arg = &list_next(tag.data.call.arguments)->tag;
-      tag_init_copy(arg, &l->tag);
+      *arg = l->tag;
       l->tag = tag;
     next:
       l = list_next(l);