Bug 609502 - metacity crashes if gconf string list is used to define keybindings
metacity crashes if gconf string list is used to define keybindings
Status: RESOLVED OBSOLETE
Product: metacity
Classification: Other
Component: general
trunk
Other opensolaris
: Normal major
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2010-02-10 06:57 UTC by Wang Xin
Modified: 2016-02-07 23:18 UTC (History)
2 users (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the problem (767 bytes, patch)
2010-02-10 06:58 UTC, Wang Xin
reviewed Details | Diff | Review

Description Wang Xin 2010-02-10 06:57:04 UTC
In src/core/prefs.c:init_bindings, the following code is used to handle keybindins defined as gconf string list.
            {
              list_val = gconf_client_get_list (default_client, key, GCONF_VALUE_STRING, NULL);

              update_key_list_binding (key, list_val);
              g_slist_foreach (list_val, (GFunc)g_free, NULL);
              g_slist_free (list_val);
            }
update_key_list_binding requires a GList of gconf value but gconf_client_get_list returns a GList of string so in update_key_list_binding metacity will crash because of a NULL pointer.

The other platform will probably not crash but the problem is still there.
Comment 1 Wang Xin 2010-02-10 06:58:33 UTC
Created attachment 153389 [details] [review]
patch to fix the problem
Comment 2 Thomas Thurman 2010-05-02 15:29:02 UTC
Review of attachment 153389 [details] [review]:

Doesn't this introduce a memory leak when you remove the calls to g_free() and friends?
Comment 3 Christophe Fergeau 2010-10-15 19:48:19 UTC
This seems to address the same issue as bug #609101

Note You need to log in before you can comment on or make changes to this bug.