From 53b4c6a2c2cd75950ce19bc180eba7971d4c281a Mon Sep 17 00:00:00 2001 From: Thomas Devoogdt Date: Wed, 8 Jan 2025 19:56:05 +0100 Subject: [PATCH] fix(style): fix conditional jump or move depends on uninitialised value (#7571) Signed-off-by: Thomas Devoogdt --- src/core/lv_obj_style.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lv_obj_style.c b/src/core/lv_obj_style.c index d20ac7151..cf3429d2f 100644 --- a/src/core/lv_obj_style.c +++ b/src/core/lv_obj_style.c @@ -674,7 +674,7 @@ static lv_style_t * get_local_style(lv_obj_t * obj, lv_style_selector_t selector } lv_memzero(&obj->styles[i], sizeof(lv_obj_style_t)); - obj->styles[i].style = lv_malloc(sizeof(lv_style_t)); + obj->styles[i].style = lv_malloc_zeroed(sizeof(lv_style_t)); lv_style_init((lv_style_t *)obj->styles[i].style); obj->styles[i].is_local = 1;