Skip to content

prefs-dialog: Fix AtkRelationSet leak

Example leak report

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x623e703c8749 in calloc (/usr/asan/bin/xfce4-terminal+0x1f2749)
    #1 0x73dc1df46b62 in g_malloc0 /usr/src/debug/glib2/build/../glib/glib/gmem.c:133:13
    #2 0x73dc1f3cb7b5 in g_type_create_instance /usr/src/debug/glib2/build/../glib/gobject/gtype.c:1933:17
    #3 0x73dc1f3b0684 in g_object_new_internal /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2606:24
    #4 0x73dc1f3b1cfe in g_object_new_internal /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2603:6
    #5 0x73dc1f3b1cfe in g_object_new_with_properties /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2769:14
    #6 0x73dc1f3b2d51 in g_object_new /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2415:12
    #7 0x73dc1f98ff6c in atk_object_init /usr/src/debug/at-spi2-core/build/../at-spi2-core/atk/atkobject.c:659:30
    #8 0x73dc1f3cb80a in g_type_create_instance /usr/src/debug/glib2/build/../glib/gobject/gtype.c:1945:4
    #9 0x73dc1f3b0684 in g_object_new_internal /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2606:24
    #10 0x73dc1f3b297a in g_object_new_internal /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2923:29
    #11 0x73dc1f3b297a in g_object_new_valist /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2945:16
    #12 0x73dc1f3b2d2f in g_object_new /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2418:12
    #13 0x73dc1f009e6a in gtk_widget_real_get_accessible /home/s/code/00_asan/gtk/builddir/../gtk/gtkwidget.c:13566:24
    #14 0x623e70434084 in terminal_gtk_label_set_a11y_relation terminal/terminal-preferences-dialog.c:2186:44
    #15 0x623e7042b6d0 in terminal_preferences_dialog_init terminal/terminal-preferences-dialog.c:423:3
    #16 0x73dc1f3cb848 in g_type_create_instance /usr/src/debug/glib2/build/../glib/gobject/gtype.c:1951:5
    #17 0x73dc1f3b05ea in g_object_constructor /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2981:23
    #18 0x73dc1f3b0093 in g_object_new_with_custom_constructor /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2524:12
    #19 0x73dc1f3b1cab in g_object_new_internal /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2604:12
    #20 0x73dc1f3b1cab in g_object_new_with_properties /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2769:14
    #21 0x73dc1f3b2d51 in g_object_new /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2415:12
    #22 0x623e7042a5b0 in terminal_preferences_dialog_new terminal/terminal-preferences-dialog.c:2254:16
    #23 0x623e70477902 in terminal_window_action_prefs terminal/terminal-window.c:1837:42
    #24 0x73dc1f39e699 in g_closure_invoke /usr/src/debug/glib2/build/../glib/gobject/gclosure.c:834:7
    #25 0x73dc1f3cf2a4 in signal_emit_unlocked_R.isra.0 /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3888:8
    #26 0x73dc1f3bfa0b in signal_emit_valist_unlocked /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3520:7
    #27 0x73dc1f3bfc71 in g_signal_emit_valist /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3263:7
    #28 0x73dc1f3bfd33 in g_signal_emit /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3583:3
    #29 0x73dc1efee073 in gtk_widget_activate /home/s/code/00_asan/gtk/builddir/../gtk/gtkwidget.c:7845:7
    #30 0x73dc1ed117bf in gtk_menu_shell_activate_item /home/s/code/00_asan/gtk/builddir/../gtk/gtkmenushell.c:1375:3

Testing

  • I didn't see any additional ASan or LSan errors
  • I didn't see any additional Valgrind errors or leak reports

Additional info

There was a similar leak in Thunar: xfce/thunar#1451 (closed)

Merge request reports

Loading