[oe-commits] Otavio Salvador : xfdesktop: fix a relocation and a memory leak

GIT User account git at amethyst.openembedded.net
Fri Oct 17 17:11:40 UTC 2008


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 528236fa65537addcb3e62a08ae7cb6db216943e
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=528236fa65537addcb3e62a08ae7cb6db216943e

Author: Otavio Salvador <otavio at ossystems.com.br>
Date:   Sat Oct  4 12:07:11 2008 -0300

xfdesktop: fix a relocation and a memory leak

Due the relocation error, the menu was segfaulting and then being
unusable. This patch has been taken from Gentoo repository.

---

 .../xfce/xfdesktop/relocation-and-memleak.patch    |   49 ++++++++++++++++++++
 packages/xfce/xfdesktop_4.4.2.bb                   |    3 +
 2 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/packages/xfce/xfdesktop/relocation-and-memleak.patch b/packages/xfce/xfdesktop/relocation-and-memleak.patch
new file mode 100644
index 0000000..df9011d
--- /dev/null
+++ b/packages/xfce/xfdesktop/relocation-and-memleak.patch
@@ -0,0 +1,49 @@
+Patch taken from Gentoo at http://overlays.gentoo.org/svn/proj/alt/trunk/prefix-overlay/xfce-base/xfdesktop/files/
+
+Included by: Otavio Salvador <otavio at ossystems.com.br>
+
+diff -ur xfdesktop-4.4.2.orig/modules/menu/desktop-menu-dentry.c xfdesktop-4.4.2/modules/menu/desktop-menu-dentry.c
+--- xfdesktop-4.4.2.orig/modules/menu/desktop-menu-dentry.c	2007-11-17 21:31:43.000000000 +0200
++++ xfdesktop-4.4.2/modules/menu/desktop-menu-dentry.c	2008-03-21 11:18:59.000000000 +0200
+@@ -173,7 +173,8 @@
+         if(cmpname && g_ascii_strcasecmp(name, cmpname) < 0)
+             break;
+     }
+-    
++    g_list_free(items);
++
+     gtk_menu_shell_insert(menu_shell, mi, i);
+     
+     return i;
+diff -ur xfdesktop-4.4.2.orig/modules/menu/desktop-menuspec.c xfdesktop-4.4.2/modules/menu/desktop-menuspec.c
+--- xfdesktop-4.4.2.orig/modules/menu/desktop-menuspec.c	2007-11-17 21:31:43.000000000 +0200
++++ xfdesktop-4.4.2/modules/menu/desktop-menuspec.c	2008-03-21 11:18:59.000000000 +0200
+@@ -203,7 +203,7 @@
+                 else
+                     foundcat = NULL;
+                 if(!foundcat) {
+-                    g_ptr_array_free(revpath, FALSE);
++                    g_ptr_array_free(revpath, TRUE);
+                     revpath = NULL;
+                     break;
+                 }
+@@ -220,7 +220,7 @@
+                 newpath[totlen] = 0;
+                 
+                 g_ptr_array_add(mtfpi->paths, newpath);
+-                g_ptr_array_free(revpath, FALSE);
++                g_ptr_array_free(revpath, TRUE);
+             }
+         }
+     }
+diff -ur xfdesktop-4.4.2.orig/modules/menu/desktop-menuspec.h xfdesktop-4.4.2/modules/menu/desktop-menuspec.h
+--- xfdesktop-4.4.2.orig/modules/menu/desktop-menuspec.h	2007-11-17 21:31:43.000000000 +0200
++++ xfdesktop-4.4.2/modules/menu/desktop-menuspec.h	2008-03-21 11:18:56.000000000 +0200
+@@ -82,6 +82,6 @@
+  * @param paths A GPtrArray obtained from either menuspec_get_path_simple() or
+  *              menuspec_get_path_multilevel().
+  */
+-G_INLINE_FUNC void desktop_menuspec_path_free(GPtrArray *paths);
++void desktop_menuspec_path_free(GPtrArray *paths);
+ 
+ #endif /* ifdef __MENUSPEC_H__ */
diff --git a/packages/xfce/xfdesktop_4.4.2.bb b/packages/xfce/xfdesktop_4.4.2.bb
index 35c5ff5..6c92b0f 100644
--- a/packages/xfce/xfdesktop_4.4.2.bb
+++ b/packages/xfce/xfdesktop_4.4.2.bb
@@ -7,6 +7,9 @@ SECTION = "x11/base"
 DEPENDS = "virtual/libx11 libxfcegui4 libxfce4mcs libxml2 xfce4-panel"
 
 inherit xfce
+
+SRC_URI += " file://relocation-and-memleak.patch;patch=1 "
+
 PACKAGES += "xfdesktop-backdrops ${PN}-mcs-plugins"
 
 FILES_xfdesktop-backdrops="${datadir}/xfce4/backdrops/*"





More information about the Openembedded-commits mailing list