Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1599)

Issue 103100045: Fix GVariant leak in IBusService::GetValue (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by fujiwara
Modified:
10 years ago
Reviewers:
shawn.p.huang, Peng
CC:
shawn.p.huang_gmail.com, fujiwara, cfergeau_redhat.com
Base URL:
git://github.com/ibus/ibus.git@master
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : Updated with the latest master. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -0 lines) Patch
M src/ibusconfigservice.c View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 2
fujiwara
10 years ago (2014-06-04 08:09:53 UTC) #1
Peng
10 years ago (2014-06-05 14:13:40 UTC) #2
lgtm
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b