Skip to content
Snippets Groups Projects
Commit a0f4b725 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #6623: fixed more leaks

parent 9dea523c
Branches
Tags
No related merge requests found
...@@ -352,12 +352,9 @@ initialize_accelerators_list () ...@@ -352,12 +352,9 @@ initialize_accelerators_list ()
static void static void
update_shortcuts_map (const gchar* action, guint key, GdkModifierType mask) update_shortcuts_map (const gchar* action, guint key, GdkModifierType mask)
{ {
gchar buffer[7];
// Bindings: MASKxCODE // Bindings: MASKxCODE
sprintf (buffer, "%dx%d", mask, key); gchar *buffer = g_strdup_printf("%dx%d", mask, key);
g_hash_table_replace (shortcutsMap, g_strdup (action), buffer);
g_hash_table_replace (shortcutsMap, g_strdup (action), g_strdup (buffer));
} }
static void static void
...@@ -439,7 +436,7 @@ shortcuts_initialize_bindings () ...@@ -439,7 +436,7 @@ shortcuts_initialize_bindings ()
for (shortcutsKeysElement = shortcutsKeys; shortcutsKeysElement; shortcutsKeysElement for (shortcutsKeysElement = shortcutsKeys; shortcutsKeysElement; shortcutsKeysElement
= shortcutsKeysElement->next) { = shortcutsKeysElement->next) {
action = shortcutsKeysElement->data; action = shortcutsKeysElement->data;
maskAndKey = g_strdup (g_hash_table_lookup (shortcutsMap, action)); maskAndKey = g_hash_table_lookup (shortcutsMap, action);
token1 = strtok (maskAndKey, "x"); token1 = strtok (maskAndKey, "x");
token2 = strtok (NULL, "x"); token2 = strtok (NULL, "x");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment