Commit dbf15147e675502942f1152b2cde24a84b85e90e

Thomas de Grivel 2024-11-07T16:11:02

fix memleak in cfn stacktrace push without pop

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/libkc3/cfn.c b/libkc3/cfn.c
index b2bad89..01b5dfe 100644
--- a/libkc3/cfn.c
+++ b/libkc3/cfn.c
@@ -153,6 +153,7 @@ s_tag * cfn_apply (s_cfn *cfn, s_list *args, s_tag *dest)
     }
     else
       *dest = tmp;
+    g_kc3_env.stacktrace = list_delete(trace);
   }
   else {
     err_puts("cfn_apply: NULL function pointer");