diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-11-12 11:50:04 +0100 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-11-12 11:50:04 +0100 |
commit | 3b4ecb626f803cd1ba5778149e5de27b39bcb78a (patch) | |
tree | fb65034d7b4a27891419a5b9e2496657e726be60 | |
parent | 5c15b8149f6270edcf443884717535ad236001dd (diff) | |
parent | 13f4c2e8c5cd5af0ae04f730990cb316e10b67e3 (diff) | |
download | ayatana-indicator-messages-3b4ecb626f803cd1ba5778149e5de27b39bcb78a.tar.gz ayatana-indicator-messages-3b4ecb626f803cd1ba5778149e5de27b39bcb78a.tar.bz2 ayatana-indicator-messages-3b4ecb626f803cd1ba5778149e5de27b39bcb78a.zip |
im-menu: fix leak
-rw-r--r-- | src/im-menu.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/im-menu.c b/src/im-menu.c index 1aaffe3..0aa042c 100644 --- a/src/im-menu.c +++ b/src/im-menu.c @@ -180,9 +180,16 @@ im_menu_insert_section (ImMenu *menu, for (position = 1; position < g_menu_model_get_n_items(G_MENU_MODEL (priv->menu)) - 1; position++) { gchar * item_sort = NULL; + if (g_menu_model_get_item_attribute(G_MENU_MODEL(priv->menu), position, "x-messaging-menu-sort-string", "s", &item_sort)) - if (g_utf8_collate(sort_string, item_sort) < 0) - break; + { + if (g_utf8_collate(sort_string, item_sort) < 0) + { + g_free (item_sort); + break; + } + } + g_free(item_sort); } |