[libhandy/libhandy-1-2] tab-bar: fix leak of extra drag destination targets



commit ce60e636c2fcf5079c0055f39b493e55cdd91003
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Tue May 4 14:22:24 2021 -0500

    tab-bar: fix leak of extra drag destination targets
    
    Found by valgrind:
    
    ==110513== 336 (16 direct, 320 indirect) bytes in 1 blocks are definitely lost in loss record 18,053 of 
19,080
    ==110513==    at 0x484086F: malloc (vg_replace_malloc.c:380)
    ==110513==    by 0x5601E32: g_malloc (gmem.c:106)
    ==110513==    by 0x561E3FF: g_slice_alloc (gslice.c:1069)
    ==110513==    by 0x4D20C20: gtk_target_list_new (gtkselection.c:249)
    ==110513==    by 0x48C7002: ephy_tab_view_set_tab_bar (ephy-tab-view.c:618)
    ==110513==    by 0x48D2330: ephy_window_constructed (ephy-window.c:3742)
    ==110513==    by 0x5551B94: g_object_new_internal (gobject.c:1979)
    ==110513==    by 0x55529E1: g_object_new_valist (gobject.c:2282)
    ==110513==    by 0x5551664: g_object_new (gobject.c:1782)
    ==110513==    by 0x48D2B3C: ephy_window_new (ephy-window.c:3881)
    ==110513==    by 0x48BD7DF: session_parse_window (ephy-session.c:1128)
    ==110513==    by 0x48BE1AD: session_start_element (ephy-session.c:1304)
    
    
    (cherry picked from commit 6c90692294ff71e31f890f28762638ddc54dfd57)

 src/hdy-tab-bar.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/hdy-tab-bar.c b/src/hdy-tab-bar.c
index 10fa8689..4ed42f95 100644
--- a/src/hdy-tab-bar.c
+++ b/src/hdy-tab-bar.c
@@ -391,6 +391,8 @@ hdy_tab_bar_dispose (GObject *object)
 
   hdy_tab_bar_set_view (self, NULL);
 
+  g_clear_object (&self->extra_drag_dest_targets);
+
   G_OBJECT_CLASS (hdy_tab_bar_parent_class)->dispose (object);
 }
 


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