Commit 593f707604f48618e44cefa41c679da94cc18cc9

Thomas de Grivel 2024-07-22T18:43:19

fix double free

diff --git a/libkc3/buf_parse.c b/libkc3/buf_parse.c
index e799226..037193f 100644
--- a/libkc3/buf_parse.c
+++ b/libkc3/buf_parse.c
@@ -1041,9 +1041,11 @@ sw buf_parse_call_op_unary (s_buf *buf, s_call *dest)
     goto restore;
   result += r;
   if (! operator_resolve(&tmp.ident, 1, &tmp.ident)) {
-    err_write_1("buf_parse_call_op_unary: ");
-    err_inspect_ident(&tmp.ident);
-    err_puts(": operator_resolve");
+    if (false) {
+      err_write_1("buf_parse_call_op_unary: ");
+      err_inspect_ident(&tmp.ident);
+      err_puts(": operator_resolve");
+    }
     goto restore;
   }
   buf_save_clean(buf, &save);
diff --git a/libkc3/env.c b/libkc3/env.c
index c2a3346..deb5552 100644
--- a/libkc3/env.c
+++ b/libkc3/env.c
@@ -2285,11 +2285,9 @@ bool * env_module_has_ident (s_env *env, const s_sym *module,
     return NULL;
   }
   if (fact) {
-    facts_with_cursor_clean(&cursor);
     *dest = true;
     return dest;
   }
-  facts_with_cursor_clean(&cursor);
   *dest = false;
   return dest;
 }