• Hans Petter Jansson's avatar
    GDbusProxy: Plug memory leak. · ae048625
    Hans Petter Jansson authored
    proxy->priv->name_owner gets overwritten in async_init_data_set_name_owner() on the
    assumption that it will always be NULL when we get there. However,
    on_name_owner_changed() can run first, and it does set name_owner.
    ==20126== 42 bytes in 6 blocks are definitely lost in loss record 15,174 of 48,256
    ==20126==    at 0x4C280F3: malloc (vg_replace_malloc.c:299)
    ==20126==    by 0x7541D00: g_malloc (gmem.c:104)
    ==20126==    by 0x7558FEE: g_strdup (gstrfuncs.c:364)
    ==20126==    by 0x6DF8E4F: on_name_owner_changed (gdbusproxy.c:1399)
    ==20126==    by 0x6DE94C4: emit_signal_instance_in_idle_cb (gdbusconnection.c:3743)
    ==20126==    by 0x753C315: g_main_dispatch (gmain.c:3066)
    ==20126==    by 0x753C315: g_main_context_dispatch (gmain.c:3642)
    ==20126==    by 0x753C667: g_main_context_iterate.isra.24 (gmain.c:3713)
    ==20126==    by 0x753CA69: g_main_loop_run (gmain.c:3907)
    ==20126==    by 0x5E38000: meta_run (main.c:556)
    ==20126==    by 0x401EC0: main (main.c:441)
gdbusproxy.c 109 KB