Skip to content

xdg-cache: Fix TumblerThumbnailFlavor leaks

Leak report

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7f7345f7335d in calloc
    #1 0x7f734579903a in g_malloc0 glib/glib/gmem.c:133:13
    #2 0x7f7345b877f0 in g_type_create_instance glib/gobject/gtype.c:1882:17
    #3 0x7f7345b26205 in g_object_new_internal glib/gobject/gobject.c:2665:24
    #4 0x7f7345b2575f in g_object_new_valist glib/gobject/gobject.c:3003:16
    #5 0x7f7345b2425b in g_object_new glib/gobject/gobject.c:2479:12
    #6 0x7f7346adb76a in tumbler_thumbnail_flavor_new_large tumbler/tumbler/tumbler-thumbnail-flavor.c:202:10
    #7 0x7b7340c1c940 in xdg_cache_cache_init tumbler/plugins/xdg-cache/xdg-cache-cache.c:135:12
    #8 0x7f7345b87ea3 in g_type_create_instance glib/gobject/gtype.c:1900:5
    #9 0x7f7345b26205 in g_object_new_internal glib/gobject/gobject.c:2665:24
    #10 0x7f7345b2429b in g_object_new_with_properties glib/gobject/gobject.c:2827:14
    #11 0x7f7345b2429b in g_object_new glib/gobject/gobject.c:2476:12
    #12 0x7b7340c1f1a4 in tumbler_plugin_get_cache tumbler/plugins/xdg-cache/xdg-cache-plugin.c:71:10
    #13 0x7f7346ad3a99 in tumbler_cache_plugin_get_cache tumbler/tumbler/tumbler-cache-plugin.c:200:10
    #14 0x7f7346ad489d in tumbler_cache_get_default tumbler/tumbler/tumbler-cache.c:50:19
    #15 0x560fdbd8e905 in tumbler_cache_service_constructed tumbler/tumblerd/tumbler-cache-service.c:199:20
    #16 0x7f7345b265e1 in g_object_new_internal glib/gobject/gobject.c:2715:5
    #17 0x7f7345b2575f in g_object_new_valist glib/gobject/gobject.c:3003:16
    #18 0x7f7345b2425b in g_object_new glib/gobject/gobject.c:2479:12
    #19 0x560fdbd8e361 in tumbler_cache_service_new tumbler/tumblerd/tumbler-cache-service.c:471:10
    #20 0x560fdbd8dd1a in main tumbler/tumblerd/main.c:194:19

Steps to reproduce

  1. systemctl --user restart tumblerd
  2. Take a screenshot of the desktop with xfce4-screenshooter and save it to the desktop
  3. Wait for the service to shut down

Testing

  • No issues were detected when testing the patch with UBSan, LSan, and ASan

Merge request reports

Loading