lvgl: Suppress memory leak errors detected by valgrind
The lvgl library is configured in some tests to use
the libC malloc to allocate heap. In native_posix this
ends up in the underlying OS heap, which cannot be safely
freed in general when the program finnishes, and
ends up being reported by valgrind as leaked on exit. See
https://github.com/zephyrproject-rtos/zephyr/pull/18471
for a longer discussion.
Instead of trying to fix the leak, let's just accept it
but suppress the errors so it does not confuse other
developers
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
diff --git a/scripts/valgrind.supp b/scripts/valgrind.supp
index 791a792..9719dce1 100644
--- a/scripts/valgrind.supp
+++ b/scripts/valgrind.supp
@@ -23,4 +23,18 @@
fun:pthread_create*
fun:posix_boot_cpu
fun:main
-}
\ No newline at end of file
+}
+{
+ lvgl no cleanup
+ Memcheck:Leak
+ match-leak-kinds: possible
+ fun:malloc
+ fun:lv_mem_alloc
+}
+{
+ lvgl no cleanup 2
+ Memcheck:Leak
+ match-leak-kinds: possible
+ fun:malloc
+ fun:lvgl_allocate_rendering_buffers
+}