[gnome-software] shell: Fix a memory leak when dismissing events



commit b88b407c7617ef37962334e5fc3b2d008c9b3069
Author: Kalev Lember <klember redhat com>
Date:   Mon Jan 29 22:18:31 2018 +0100

    shell: Fix a memory leak when dismissing events

 src/gs-shell.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 126a2335..ae9eab5f 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -1666,9 +1666,9 @@ gs_shell_events_notify_cb (GsPluginLoader *plugin_loader,
 static void
 gs_shell_plugin_event_dismissed_cb (GtkButton *button, GsShell *shell)
 {
-       GPtrArray *events;
        GsShellPrivate *priv = gs_shell_get_instance_private (shell);
        guint i;
+       g_autoptr(GPtrArray) events = NULL;
 
        /* mark any events currently showing as invalid */
        events = gs_plugin_loader_get_events (priv->plugin_loader);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]