[gnome-flashback] notifications: fix memory leaks



commit 209aee4f2f748f362dbe5e27733b092f9a5ea03b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Feb 9 15:59:37 2020 +0200

    notifications: fix memory leaks

 gnome-flashback/libnotifications/nd-queue.c | 2 ++
 gnome-flashback/libnotifications/nd-stack.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gnome-flashback/libnotifications/nd-queue.c b/gnome-flashback/libnotifications/nd-queue.c
index 43c0324..c9dcd9e 100644
--- a/gnome-flashback/libnotifications/nd-queue.c
+++ b/gnome-flashback/libnotifications/nd-queue.c
@@ -497,6 +497,8 @@ nd_queue_finalize (GObject *object)
         g_clear_object (&queue->priv->numerable_icon);
         g_clear_object (&queue->priv->status_icon);
 
+        g_clear_pointer (&queue->priv->dock, gtk_widget_destroy);
+
         G_OBJECT_CLASS (nd_queue_parent_class)->finalize (object);
 }
 
diff --git a/gnome-flashback/libnotifications/nd-stack.c b/gnome-flashback/libnotifications/nd-stack.c
index 574e8a1..8c48418 100644
--- a/gnome-flashback/libnotifications/nd-stack.c
+++ b/gnome-flashback/libnotifications/nd-stack.c
@@ -153,7 +153,7 @@ nd_stack_finalize (GObject *object)
                 g_source_remove (stack->priv->update_id);
         }
 
-        g_list_free (stack->priv->bubbles);
+        g_list_free_full (stack->priv->bubbles, (GDestroyNotify) gtk_widget_destroy);
 
         G_OBJECT_CLASS (nd_stack_parent_class)->finalize (object);
 }


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