Commit e2190819321e464b0df5bc3520c15f1b57abb12d

Thomas de Grivel 2024-08-01T17:31:13

clean file_dir and file_path in env_load

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/libkc3/env.c b/libkc3/env.c
index 5ffd4fa..4221921 100644
--- a/libkc3/env.c
+++ b/libkc3/env.c
@@ -2238,6 +2238,9 @@ bool env_load (s_env *env, const s_str *path)
   buf_clean(&buf);
   return true;
  ko:
+  tag_clean(file_dir);
+  *file_dir = file_dir_save;
+  *file_path = file_path_save;
   buf_getc_close(&buf);
   buf_clean(&buf);
   return false;