From baee02266e2a99a73e87fef094b066ce5d9ff923 Mon Sep 17 00:00:00 2001 From: rabbitsaviola Date: Tue, 7 Jul 2020 10:16:44 +0800 Subject: [PATCH] Fix memory leak if image file open fails --- src/lv_draw/lv_img_decoder.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lv_draw/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c index d0cdffe61..e916bd85f 100644 --- a/src/lv_draw/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -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; }