fix(obj_class): fix possible memory leak when the default disp is NULL
@@ -56,6 +56,7 @@ lv_obj_t * lv_obj_class_create_obj(const lv_obj_class_t * class_p, lv_obj_t * pa
lv_disp_t * disp = lv_disp_get_default();
if(!disp) {
LV_LOG_WARN("No display created yet. No place to assign the new screen");
+ lv_mem_free(obj);
return NULL;
}
