Skip to content

Fix leaks in thunar_apr_image_page_file_changed

correctmost requested to merge correctmost/thunar:cm/fix-apr-image-leaks into master

Leak report

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x5b9b31065919 in malloc (/usr/asan/bin/thunar+0x498919)
    #1 0x7cf52dedce4a in g_malloc /usr/src/debug/glib2/build/../glib/glib/gmem.c:100:13
    #2 0x7cf52def325a in g_strdup /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.c:323:17
    #3 0x7cf52982dcf4 in thunar_apr_image_page_file_changed thunar/plugins/thunar-apr/thunar-apr-image-page.c:249:83
    #4 0x7cf52de2c699 in g_closure_invoke /usr/src/debug/glib2/build/../glib/gobject/gclosure.c:834:7
    #5 0x7cf52de5d8a1 in signal_emit_unlocked_R.isra.0 /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3928:7
    #6 0x7cf52de4da0b in signal_emit_valist_unlocked /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3520:7
    #7 0x7cf52de4dc71 in g_signal_emit_valist /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3263:7
    #8 0x7cf52de4dd33 in g_signal_emit /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3583:3
    #9 0x7cf52981a905 in thunar_apr_abstract_page_file_changed thunar/plugins/thunar-apr/thunar-apr-abstract-page.c:184:3
    #10 0x7cf52981a7a5 in thunar_apr_abstract_page_set_file thunar/plugins/thunar-apr/thunar-apr-abstract-page.c:245:7
    #11 0x7cf52981b321 in thunar_apr_abstract_page_set_property thunar/plugins/thunar-apr/thunar-apr-abstract-page.c:168:7
[...snip...]

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x5b9b31065919 in malloc (/usr/asan/bin/thunar+0x498919)
    #1 0x7cf52dedce4a in g_malloc /usr/src/debug/glib2/build/../glib/glib/gmem.c:100:13
    #2 0x7cf52def325a in g_strdup /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.c:323:17
    #3 0x7cf52982dce1 in thunar_apr_image_page_file_changed thunar/plugins/thunar-apr/thunar-apr-image-page.c:249:46
    #4 0x7cf52de2c699 in g_closure_invoke /usr/src/debug/glib2/build/../glib/gobject/gclosure.c:834:7
    #5 0x7cf52de5d8a1 in signal_emit_unlocked_R.isra.0 /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3928:7
    #6 0x7cf52de4da0b in signal_emit_valist_unlocked /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3520:7
    #7 0x7cf52de4dc71 in g_signal_emit_valist /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3263:7
    #8 0x7cf52de4dd33 in g_signal_emit /usr/src/debug/glib2/build/../glib/gobject/gsignal.c:3583:3
    #9 0x7cf52981a905 in thunar_apr_abstract_page_file_changed thunar/plugins/thunar-apr/thunar-apr-abstract-page.c:184:3
    #10 0x7cf52981a7a5 in thunar_apr_abstract_page_set_file thunar/plugins/thunar-apr/thunar-apr-abstract-page.c:245:7
    #11 0x7cf52981b321 in thunar_apr_abstract_page_set_property thunar/plugins/thunar-apr/thunar-apr-abstract-page.c:168:7
[...snip...]

Steps to reproduce

  • Right-click on an image and open the Properties dialog
  • Switch to the Image tab

Testing

  • No issues were detected with LSan, ASan, or Valgrind when testing the patch

Merge request reports

Loading