From a2118e3938b85d02de60bfaefa721edf461435f1 Mon Sep 17 00:00:00 2001 From: Alcaro Date: Sat, 23 Jan 2016 15:23:31 +0100 Subject: [PATCH] Fix memory leak. --- cores/libretro-imageviewer/image_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cores/libretro-imageviewer/image_core.c b/cores/libretro-imageviewer/image_core.c index 3131a56520..402a995030 100644 --- a/cores/libretro-imageviewer/image_core.c +++ b/cores/libretro-imageviewer/image_core.c @@ -198,6 +198,8 @@ static bool imageviewer_load(const char *path, uint32_t *buf, int image_index) int comp; struct retro_system_av_info info; uint32_t *end = NULL; + if (image_buffer) free(image_buffer); + image_buffer = (uint32_t*)stbi_load( path, &image_width,