Commit 478864e1ba18f804f1f96030df1ac4eaa1e0d86a

Thomas de Grivel 2023-03-15T16:20:05

fix memleak

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/libc3/facts.c b/libc3/facts.c
index 70d16a9..1f5c80c 100644
--- a/libc3/facts.c
+++ b/libc3/facts.c
@@ -264,6 +264,7 @@ sw facts_load (s_facts *facts, s_buf *buf)
     warnx("facts_load: invalid hash line %lu: 0x%s",
           (unsigned long) i + 4,
           tmp.ptr.ps8);
+    buf_clean(&tmp);
     return -1;
   }
   return result;