[gnome-software] appstream: Fix a leak when adding alternates
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] appstream: Fix a leak when adding alternates
- Date: Fri, 12 Oct 2018 13:53:34 +0000 (UTC)
commit 0b366c27720c3a89f7507d0ce69b74b8c1a9799b
Author: Kalev Lember <klember redhat com>
Date: Fri Oct 12 15:46:46 2018 +0200
appstream: Fix a leak when adding alternates
plugins/core/gs-appstream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 4df4d6e7..3efc679e 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -1037,7 +1037,7 @@ gs_appstream_add_alternates (GsPlugin *plugin,
GError **error)
{
GPtrArray *apps = as_store_get_apps (store);
- GPtrArray *ids = g_ptr_array_new_with_free_func (g_free);
+ g_autoptr(GPtrArray) ids = g_ptr_array_new_with_free_func (g_free);
/* find apps that provide the new name */
for (guint i = 0; i < apps->len; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]