diff --git a/core_info.c b/core_info.c
index 6ea4465488..dd8559ae0d 100644
--- a/core_info.c
+++ b/core_info.c
@@ -208,6 +208,7 @@ void core_info_list_free(core_info_list_t *core_info_list)
       core_info_t *info = (core_info_t*)&core_info_list->list[i];
 
       free(info->path);
+      free(info->systemname);
       free(info->display_name);
       free(info->supported_extensions);
       free(info->authors);
diff --git a/frontend/menu/disp/lakka.c b/frontend/menu/disp/lakka.c
index 858e153b38..bb8c639139 100644
--- a/frontend/menu/disp/lakka.c
+++ b/frontend/menu/disp/lakka.c
@@ -630,7 +630,7 @@ static void lakka_frame(void)
 
 static GLuint png_texture_load(const char * file_name)
 {
-   struct texture_image ti;
+   struct texture_image ti = {0};
    texture_image_load(&ti, file_name);
 
    /* Generate the OpenGL texture object */
@@ -642,6 +642,8 @@ static GLuint png_texture_load(const char * file_name)
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 
+   free(ti.pixels);
+
    return texture;
 }
 
@@ -891,8 +893,9 @@ static void lakka_context_reset(void *data)
          info = (core_info_t*)&info_list->list[i-1];
 
       if (info != NULL && info->systemname) {
-         strlcpy(core_id, info->systemname, sizeof(core_id));
-         strlcpy(core_id, str_replace(core_id, "/", " "), sizeof(core_id));
+         char *tmp = str_replace(info->systemname, "/", " ");
+         strlcpy(core_id, tmp, sizeof(core_id));
+         free(tmp);
       } else {
          strlcpy(core_id, "default", sizeof(core_id));
       }
@@ -1021,6 +1024,10 @@ static void lakka_free(void *data)
 
    if (menu->alloc_font)
       free((uint8_t*)menu->font);
+
+   if (g_extern.core_info)
+      core_info_list_free(g_extern.core_info);
+   g_extern.core_info = NULL;
 }
 
 static int lakka_input_postprocess(uint64_t old_state)
diff --git a/frontend/menu/disp/lakka.h b/frontend/menu/disp/lakka.h
index 575efebb28..0005cdea9b 100644
--- a/frontend/menu/disp/lakka.h
+++ b/frontend/menu/disp/lakka.h
@@ -53,7 +53,7 @@ typedef struct
 typedef struct
 {
    char  name[256];
-   char  rom[256];
+   char  rom[PATH_MAX];
    float  alpha;
    float  zoom;
    float  y;
@@ -65,7 +65,7 @@ typedef struct
 typedef struct
 {
    char  name[256];
-   char  libretro[256];
+   char  libretro[PATH_MAX];
    GLuint icon;
    GLuint item_icon;
    float  alpha;