[oe-commits] Julian_chu : packagekit: Add a patch for packagekit

GIT User account git at amethyst.openembedded.net
Wed Oct 29 13:04:21 UTC 2008


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

Author: Julian_chu <julian_chu at openmoko.com>
Date:   Wed Jul 30 18:24:08 2008 +0800

packagekit: Add a patch for packagekit
to fix some memory leak issues.

---

 .../files/remove_search_memory_leak.patch          |   51 ++++++++++++++++++++
 packages/packagekit/packagekit_git.bb              |    3 +-
 2 files changed, 53 insertions(+), 1 deletions(-)

diff --git a/packages/packagekit/files/remove_search_memory_leak.patch b/packages/packagekit/files/remove_search_memory_leak.patch
new file mode 100644
index 0000000..bcc27ad
--- /dev/null
+++ b/packages/packagekit/files/remove_search_memory_leak.patch
@@ -0,0 +1,51 @@
+diff --git a/backends/opkg/pk-backend-opkg.c b/backends/opkg/pk-backend-opkg.c
+index 0b9867e..a7b5244 100644
+--- a/backends/opkg/pk-backend-opkg.c
++++ b/backends/opkg/pk-backend-opkg.c
+@@ -307,21 +307,23 @@ pk_opkg_package_list_cb (opkg_t *opkg, opkg_package_t *pkg, void *data)
+ 
+ 	/* check filters */
+ 
+-	if ((filters & PK_FILTER_ENUM_DEVELOPMENT) && !opkg_is_devel_pkg (pkg))
+-		return;
++	if ((filters & PK_FILTER_ENUM_DEVELOPMENT) && !opkg_is_devel_pkg (pkg)) 
++		goto end_handle;
+ 	if ((filters & PK_FILTER_ENUM_NOT_DEVELOPMENT) && opkg_is_devel_pkg (pkg))
+-		return;
++		goto end_handle;
+ 	if ((filters & PK_FILTER_ENUM_GUI) && !opkg_is_gui_pkg (pkg))
+-		return;
++		goto end_handle;
+ 	if ((filters & PK_FILTER_ENUM_NOT_GUI) && opkg_is_gui_pkg (pkg))
+-		return;
++		goto end_handle;
+ 	if ((filters & PK_FILTER_ENUM_INSTALLED) && (!pkg->installed))
+-		return;
++		goto end_handle;
+ 	if ((filters & PK_FILTER_ENUM_NOT_INSTALLED) && (pkg->installed))
+-		return;
++		goto end_handle;
+ 
+ 	pk_backend_package (params->backend, status, uid, pkg->description);
+ 
++end_handle:
++	g_free(uid);
+ }
+ 
+ static gboolean
+@@ -616,6 +618,7 @@ pk_opkg_list_upgradable_cb (opkg_t *opkg, opkg_package_t *pkg, void *data)
+ 		pkg->name, pkg->version, pkg->architecture);
+ 
+ 	pk_backend_package (backend, status, uid, pkg->description);
++	g_free(uid);
+ }
+ 
+ static gboolean
+@@ -696,6 +699,7 @@ backend_get_details_thread (PkBackend *backend)
+ 
+ 	pk_backend_details (backend, newid, NULL, group, pkg->description, pkg->url, pkg->size);
+ 	g_free (newid);
++	opkg_package_free(pkg);
+ 	pk_backend_finished (backend);
+ 	return TRUE;
+ }
diff --git a/packages/packagekit/packagekit_git.bb b/packages/packagekit/packagekit_git.bb
index f78cc26..e3d3335 100644
--- a/packages/packagekit/packagekit_git.bb
+++ b/packages/packagekit/packagekit_git.bb
@@ -5,12 +5,13 @@ LICENSE = "GPL"
 DEPENDS = "dbus (>= 1.1.1) dbus-glib glib-2.0 sqlite3 opkg intltool intltool-native (>= 0.37.1)"
 RDEPENDS_${PN} = "opkg"
 PV = "0.2.3+gitr${SRCREV}"
-PR = "r14"
+PR = "r15"
 
 SRC_URI = "git://anongit.freedesktop.org/git/packagekit;protocol=git \
            file://disable-docbook2man.patch;patch=1 \
            file://repository-ping.patch;patch=1 \
            file://force_depends.patch;patch=1 \
+           file://remove_search_memory_leak.patch;patch=1 \
            "
 
 





More information about the Openembedded-commits mailing list