From 9c8c395d5eb25fe4148d8cac0d1526b3c9881060 Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Thu, 20 Sep 2018 23:28:35 -0500 Subject: [PATCH] removed the free from the menu-entry file and put it in the function that called it, now it is easier to track when its freed --- common/menu-entry.c | 1 - common/menu-list.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/common/menu-entry.c b/common/menu-entry.c index 23fee2f..d74485b 100644 --- a/common/menu-entry.c +++ b/common/menu-entry.c @@ -299,7 +299,6 @@ bool menuEntryLoad(menuEntry_s* me, const char* name, bool shortcut) { //Todo load in the data about the theme? //Add a theme name property to each one? //Ability to load the theme as you hover over? - free((void*)name);//This was allocated by calloc and copied over by strcpy } return true; diff --git a/common/menu-list.c b/common/menu-list.c index 22c5fb7..2a1a99d 100644 --- a/common/menu-list.c +++ b/common/menu-list.c @@ -190,6 +190,7 @@ int themeMenuScan(const char* target) { menuAddEntry(me); else menuDeleteEntry(me); + free((void*)name);//This was allocated by calloc and copied over by strcpy } closedir(dir);