freed imageptr after copied to me->icon_gfx
This commit is contained in:
parent
1b5224e95a
commit
9e64b18495
@ -349,6 +349,7 @@ void menuEntryParseIcon(menuEntry_s* me) {
|
|||||||
if (me->icon_gfx == NULL) return;
|
if (me->icon_gfx == NULL) return;
|
||||||
|
|
||||||
memcpy(me->icon_gfx, imageptr, imagesize);
|
memcpy(me->icon_gfx, imageptr, imagesize);
|
||||||
|
free(imageptr);//this now points to what tjDecompress2 allocated with malloc, needs to be freed
|
||||||
tjDestroy(_jpegDecompressor);
|
tjDestroy(_jpegDecompressor);
|
||||||
|
|
||||||
me->icon_gfx_small = downscaleImg(me->icon_gfx, 256, 256, 140, 140, IMAGE_MODE_RGB24);
|
me->icon_gfx_small = downscaleImg(me->icon_gfx, 256, 256, 140, 140, IMAGE_MODE_RGB24);
|
||||||
|
Loading…
Reference in New Issue
Block a user