diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2019-01-28 11:39:33 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-02-02 08:12:09 +0700 |
commit | 58e46cadc224c0ea644ec068eb6fe3bae93acf7c (patch) | |
tree | 2974553e2b13cab535a565329c5afbaa81e2baa6 | |
parent | ea44831becb157c1dfd45b927de10bc48020a28c (diff) |
libraries/menu-cache: Apply a patch from upstream, cleanups.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r-- | libraries/menu-cache/README | 2 | ||||
-rw-r--r-- | libraries/menu-cache/menu-cache.SlackBuild | 11 | ||||
-rw-r--r-- | libraries/menu-cache/patches/0001-libmenu-cache-fix-memory-leaks.patch | 40 |
3 files changed, 47 insertions, 6 deletions
diff --git a/libraries/menu-cache/README b/libraries/menu-cache/README index e506bf6a1654d..2fbf04c68d34f 100644 --- a/libraries/menu-cache/README +++ b/libraries/menu-cache/README @@ -1,5 +1,3 @@ -menu-cache (lightweight replacement of libgnome-menu) - Libmenu-cache is a library creating and utilizing caches to speed up the manipulation for freedesktop.org defined application menus. It can be used as a replacement of libgnome-menu of gnome-menus. diff --git a/libraries/menu-cache/menu-cache.SlackBuild b/libraries/menu-cache/menu-cache.SlackBuild index d543f1279cf96..b5157fa1faa6a 100644 --- a/libraries/menu-cache/menu-cache.SlackBuild +++ b/libraries/menu-cache/menu-cache.SlackBuild @@ -67,10 +67,13 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.?z cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Apply upstream patches +for i in $CWD/patches/* ; do patch -p1 < $i ; done sh autogen.sh || true diff --git a/libraries/menu-cache/patches/0001-libmenu-cache-fix-memory-leaks.patch b/libraries/menu-cache/patches/0001-libmenu-cache-fix-memory-leaks.patch new file mode 100644 index 0000000000000..f3eb9d7228f45 --- /dev/null +++ b/libraries/menu-cache/patches/0001-libmenu-cache-fix-memory-leaks.patch @@ -0,0 +1,40 @@ +From 97e5de8682c0c44fe4e6a2df864c5fdf76cd77cc Mon Sep 17 00:00:00 2001 +From: Palo Kisa <palo.kisa@gmail.com> +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 + |