From: danix Date: Sat, 19 Dec 2020 11:10:27 +0000 (+0100) Subject: added upstream patch for menu-cache and modified lxqt.SlackBuild to incorporate it. X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=80e9e40778450c39d77ccf57cc6fe5ed72d55c24;p=lxqt-slackware.git added upstream patch for menu-cache and modified lxqt.SlackBuild to incorporate it. --- diff --git a/lxqt.SlackBuild b/lxqt.SlackBuild index 7921829..3a48007 100755 --- a/lxqt.SlackBuild +++ b/lxqt.SlackBuild @@ -119,7 +119,7 @@ fix_perms # If any patches are needed, call this script to apply them: if [ -r $CWD/patch/${PROGRAM}.patch ]; then - . $CWD/patch/${PROGRAM}.patch || exit 1 + patch -p1 < ${PROGRAM}.patch || exit 1 fi # Check autotools builds before continuing with cmake programs diff --git a/patch/menu-cache.patch b/patch/menu-cache.patch new file mode 100644 index 0000000..f3eb9d7 --- /dev/null +++ b/patch/menu-cache.patch @@ -0,0 +1,40 @@ +From 97e5de8682c0c44fe4e6a2df864c5fdf76cd77cc Mon Sep 17 00:00:00 2001 +From: Palo Kisa +Date: Thu, 30 Nov 2017 11:36:18 +0100 +Subject: [PATCH] libmenu-cache: Fix memory leaks + +--- + libmenu-cache/menu-cache.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libmenu-cache/menu-cache.c b/libmenu-cache/menu-cache.c +index 5025d72..273b503 100644 +--- a/libmenu-cache/menu-cache.c ++++ b/libmenu-cache/menu-cache.c +@@ -379,11 +379,15 @@ static MenuCacheItem* read_item(GDataInputStream* f, MenuCache* cache, + else /* separator */ + { + item->type = MENU_CACHE_TYPE_SEP; ++ g_free(line); + return item; + } + } + else ++ { ++ g_free(line); + return NULL; ++ } + + item->id = g_strndup( line + 1, len - 1 ); + g_free(line); +@@ -923,6 +927,7 @@ gboolean menu_cache_item_unref(MenuCacheItem* item) + else + { + MenuCacheApp* app = MENU_CACHE_APP(item); ++ g_free(app->generic_name); + g_free( app->exec ); + g_free(app->try_exec); + g_free(app->working_dir); +-- +2.1.4 +