fix(freetype): fix potential mem leak of freetype test (#5238)

This commit is contained in:
Benign X
2024-01-09 18:05:42 +08:00
committed by GitHub
parent 28314123c6
commit 278d8cf2a2
@@ -511,6 +511,7 @@ void test_freetype_outline_rendering_test(void)
font_italic->release_glyph(font_italic, &g);
lv_freetype_font_delete(font_italic);
#else
TEST_PASS();
#endif
@@ -527,6 +528,7 @@ static void freetype_outline_event_cb(lv_event_t * e)
break;
case LV_EVENT_DELETE:
_lv_ll_clear(param->outline);
lv_free(param->outline);
break;
case LV_EVENT_INSERT: {
void * entry = _lv_ll_ins_tail(param->outline);