[gnome-software] Plug a memory leak in the dummy plugin
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Plug a memory leak in the dummy plugin
- Date: Mon, 28 Sep 2015 08:37:26 +0000 (UTC)
commit f7a47745566e38d7c8a04abc2bfb884236202359
Author: Rafal Luzynski <digitalfreak lingonborough com>
Date: Sun Sep 27 03:55:06 2015 +0200
Plug a memory leak in the dummy plugin
https://bugzilla.gnome.org/show_bug.cgi?id=755664
src/plugins/gs-plugin-dummy.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index 1ef33d4..e1b779e 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -130,9 +130,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- GsApp *app;
-
- app = gs_app_new ("gnome-power-manager");
+ g_autoptr(GsApp) app = gs_app_new ("gnome-power-manager");
gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Power Manager");
gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "Power Management Program");
gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
@@ -152,9 +150,7 @@ gs_plugin_add_popular (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- GsApp *app;
-
- app = gs_app_new ("gnome-power-manager");
+ g_autoptr(GsApp) app = gs_app_new ("gnome-power-manager");
gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Power Manager");
gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "Power Management Program");
gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
@@ -200,8 +196,7 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- GsApp *app;
- app = gs_app_new ("gnome-boxes");
+ g_autoptr(GsApp) app = gs_app_new ("gnome-boxes");
gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Boxes");
gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "View and use virtual machines");
gs_app_set_url (app, AS_URL_KIND_HOMEPAGE, "http://www.box.org");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]