Commit f040380dd37376559a8680375260ef2ba673c8d2

Thomas de Grivel 2023-03-18T08:40:39

memleak

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/libc3/buf_parse.c b/libc3/buf_parse.c
index c18c60a..fdab149 100644
--- a/libc3/buf_parse.c
+++ b/libc3/buf_parse.c
@@ -258,6 +258,7 @@ sw buf_parse_call_op_rec (s_buf *buf, s_call *dest, u8 min_precedence)
       call_init_op(&tmp2);
       tmp2.arguments->tag = *right;
       if ((r = buf_parse_call_op_rec(buf, &tmp2, (next_op_precedence > op_precedence) ? op_precedence + 1 : op_precedence)) <= 0) {
+        tmp2.arguments->tag.type.type = TAG_VOID;
         call_clean(&tmp2);
         break;
       }
@@ -286,8 +287,6 @@ sw buf_parse_call_op_rec (s_buf *buf, s_call *dest, u8 min_precedence)
  restore:
   buf_save_restore_rpos(buf, &save);
   call_clean(&tmp);
-  call_clean(&tmp2);
-  call_clean(&tmp3);
  clean:
   buf_save_clean(buf, &save);
   return r;