summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2020-12-19 21:45:57 +0000
committerOndrej Holy <oholy@redhat.com>2021-01-05 08:50:24 +0000
commit342207ef66e3763dee08b6f208959bcfce9929b2 (patch)
tree2a76392725702a872244368385e8c2205fc7d818
parent76b8abd8725b3711fdb520a600a9d29e03aa7bd2 (diff)
downloadnautilus-342207ef66e3763dee08b6f208959bcfce9929b2.tar.gz
window-slot: Don't leak menus on destruction
We hold a ref since commit 6b16de613dc87b9f84d87a46ac5987b6d7087a5c But we never release it on slot destruction, so it leaks. Release it on destruction.
-rw-r--r--src/nautilus-window-slot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 32a3590a3..c443d2c89 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -3118,6 +3118,9 @@ nautilus_window_slot_dispose (GObject *object)
g_clear_pointer (&priv->extensions_background_menu_binding, g_binding_unbind);
g_clear_pointer (&priv->templates_menu_binding, g_binding_unbind);
+ g_clear_object (&priv->templates_menu);
+ g_clear_object (&priv->extensions_background_menu);
+
if (priv->content_view)
{
gtk_widget_destroy (GTK_WIDGET (priv->content_view));