Commit 5ee124f37be4f9db907f54dcbca505401a0808cf

Thomas de Grivel 2023-03-17T20:08:55

plug memleak

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/libc3/buf_parse.c b/libc3/buf_parse.c
index 4a9ed67..d4aef42 100644
--- a/libc3/buf_parse.c
+++ b/libc3/buf_parse.c
@@ -223,6 +223,7 @@ sw buf_parse_call_op_rec (s_buf *buf, s_call *dest, u8 min_precedence)
   assert(dest);
   buf_save_init(buf, &save);
   call_init_op(&tmp);
+  bzero(&tmp2, sizeof(s_call));
   left = &tmp.arguments->tag;
   right = &list_next(tmp.arguments)->tag;
   tag_copy(&dest->arguments->tag, left);
@@ -281,6 +282,7 @@ 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);
  clean:
   buf_save_clean(buf, &save);
   return r;