Fix memory leak if image file open fails

This commit is contained in:
rabbitsaviola
2020-07-07 10:16:44 +08:00
committed by GitHub
parent 0814185a4d
commit baee02266e
-4
View File
@@ -152,10 +152,6 @@ lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const
if(res == LV_RES_OK) break;
}
if(res == LV_RES_INV) {
memset(dsc, 0, sizeof(lv_img_decoder_dsc_t));
}
return res;
}