busybox: enable mkfs.vfat
[openembedded.git] / recipes / packagekit / files / remove_search_memory_leak.patch
1 diff --git a/backends/opkg/pk-backend-opkg.c b/backends/opkg/pk-backend-opkg.c
2 index 0b9867e..a7b5244 100644
3 --- a/backends/opkg/pk-backend-opkg.c
4 +++ b/backends/opkg/pk-backend-opkg.c
5 @@ -307,21 +307,23 @@ pk_opkg_package_list_cb (opkg_t *opkg, opkg_package_t *pkg, void *data)
6  
7         /* check filters */
8  
9 -       if ((filters & PK_FILTER_ENUM_DEVELOPMENT) && !opkg_is_devel_pkg (pkg))
10 -               return;
11 +       if ((filters & PK_FILTER_ENUM_DEVELOPMENT) && !opkg_is_devel_pkg (pkg)) 
12 +               goto end_handle;
13         if ((filters & PK_FILTER_ENUM_NOT_DEVELOPMENT) && opkg_is_devel_pkg (pkg))
14 -               return;
15 +               goto end_handle;
16         if ((filters & PK_FILTER_ENUM_GUI) && !opkg_is_gui_pkg (pkg))
17 -               return;
18 +               goto end_handle;
19         if ((filters & PK_FILTER_ENUM_NOT_GUI) && opkg_is_gui_pkg (pkg))
20 -               return;
21 +               goto end_handle;
22         if ((filters & PK_FILTER_ENUM_INSTALLED) && (!pkg->installed))
23 -               return;
24 +               goto end_handle;
25         if ((filters & PK_FILTER_ENUM_NOT_INSTALLED) && (pkg->installed))
26 -               return;
27 +               goto end_handle;
28  
29         pk_backend_package (params->backend, status, uid, pkg->description);
30  
31 +end_handle:
32 +       g_free(uid);
33  }
34  
35  static gboolean
36 @@ -616,6 +618,7 @@ pk_opkg_list_upgradable_cb (opkg_t *opkg, opkg_package_t *pkg, void *data)
37                 pkg->name, pkg->version, pkg->architecture);
38  
39         pk_backend_package (backend, status, uid, pkg->description);
40 +       g_free(uid);
41  }
42  
43  static gboolean
44 @@ -696,6 +699,7 @@ backend_get_details_thread (PkBackend *backend)
45  
46         pk_backend_details (backend, newid, NULL, group, pkg->description, pkg->url, pkg->size);
47         g_free (newid);
48 +       opkg_package_free(pkg);
49         pk_backend_finished (backend);
50         return TRUE;
51  }