diff --git a/src/lv_draw/lv_img_buf.c b/src/lv_draw/lv_img_buf.c index ec698a584..235cbe8ed 100644 --- a/src/lv_draw/lv_img_buf.c +++ b/src/lv_draw/lv_img_buf.c @@ -12,6 +12,7 @@ #include "lv_draw_img.h" #include "../lv_misc/lv_math.h" #include "../lv_misc/lv_log.h" +#include "../lv_misc/lv_mem.h" /********************* * DEFINES diff --git a/src/lv_draw/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c index 7bee84b41..c9501a429 100644 --- a/src/lv_draw/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -656,8 +656,9 @@ static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, l data_tmp++; } } - +#if LV_USE_FILESYSTEM lv_draw_buf_release(fs_buf); +#endif return LV_RES_OK; #else @@ -753,7 +754,9 @@ static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, data_tmp++; } } +#if LV_USE_FILESYSTEM lv_draw_buf_release(fs_buf); +#endif return LV_RES_OK; #else LV_LOG_WARN("Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h");