Branch: refs/heads/master
  Home:   https://github.com/ibus/ibus
  Commit: b07dedfb72eb65e4432efdd1348167db89c19639
      
https://github.com/ibus/ibus/commit/b07dedfb72eb65e4432efdd1348167db89c19639
  Author: Christophe Fergeau <[email protected]>
  Date:   2014-06-06 (Fri, 06 Jun 2014)

  Changed paths:
    M src/ibusconfigservice.c

  Log Message:
  -----------
  Fix 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

Review URL: https://codereview.appspot.com/103100045
Patch from Christophe Fergeau <[email protected]>.


-- 
-- 
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"ibus-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

回复