DescriptionFix GVariant leak in IBusService::GetValue
When handling the DBus GetValue call,
ibusconfigservice.c:ibus_config_service_service_method_call()
gets a non-floating GVariant reference through
IBusConfigService::get_value() but never unrefs it.
Running ibus-dconf in valgrind and then running tests/ibus-config
shows this leak:
=28085== 232 (80 direct, 152 indirect) bytes in 2 blocks are definitely lost in loss record 2,025 of 2,121
==28085== at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28085== by 0x56EDDF2: g_malloc (gmem.c:97)
==28085== by 0x570691C: g_slice_alloc (gslice.c:1007)
==28085== by 0x572E6D9: g_variant_get_child_value (gvariant-core.c:1009)
==28085== by 0x57261C0: g_variant_get_variant (gvariant.c:715)
==28085== by 0x4C1A732: gvdb_table_value_from_item (gvdb-reader.c:578)
==28085== by 0x4C1A7A1: gvdb_table_get_value (gvdb-reader.c:610)
==28085== by 0x4C1589C: dconf_engine_read (dconf-engine.c:528)
==28085== by 0x4C14A79: dconf_client_read (dconf-client.c:242)
==28085== by 0x40286F: ibus_config_dconf_get_value (config.c:378)
==28085== by 0x4E44F29: ibus_config_service_service_method_call (ibusconfigservice.c:194)
==28085== by 0x4E33249: ibus_service_service_method_call_cb (ibusservice.c:395)
BUG=http://code.google.com/p/ibus/issues/detail?id=1712
Patch Set 1 #Patch Set 2 : Updated with the latest master. #MessagesTotal messages: 2
|