Hello,
I run valgrind on my program and I get few memory leak/error when I try to free lv_img_dsc_t*.
My program:
background = (lv_img_dsc_t*) malloc(sizeof(lv_img_dsc_t));
background->header.always_zero = 0;
background->header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA;
background->header.w = width;
background->header.h = height;
background->data_size = width * height * 4;
...
lv_img_buf_free(background);
I get that error on valgrind:
==26391== at 0x19786C: lv_mem_free (lv_mem.c:231)
==26391== by 0x122EA2: lv_img_buf_free (lv_img_buf.c:370)
==26391== by 0x11445B: myrealease (screen.c:226)
What do I made wrong?
I don’t use alloc background.data array because I use array from png importe file.
This error lv_mem.c:231 seems to be: