Merge lp:~charlesk/indicator-appmenu/fix-953479 into lp:indicator-appmenu/0.4
Proposed by
Charles Kerr
Status: | Merged |
---|---|
Approved by: | Charles Kerr |
Approved revision: | 182 |
Merged at revision: | 180 |
Proposed branch: | lp:~charlesk/indicator-appmenu/fix-953479 |
Merge into: | lp:indicator-appmenu/0.4 |
Diff against target: |
44 lines (+15/-17) 1 file modified
src/indicator-appmenu.c (+15/-17) |
To merge this branch: | bzr merge lp:~charlesk/indicator-appmenu/fix-953479 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lars Karlitski (community) | Approve | ||
Allison Karlitskaya (community) | Approve | ||
Review via email: mp+97773@code.launchpad.net |
Description of the change
The issue is that we pass the indefinite type ARRAY into g_variant_
h/t desrt
To post a comment you must log in.
Ya. This looks good. Certainly fixes the bug.
Look just below, though. This same function is leaking 'appkeys'.
If you have some free time, that whole function could be rewritten to look something like so:
GVariantBuilder array;
GHashTable iter;
g_hash_ table_iter_ init (&iter, iapp->apps); builder_ init (&array, G_VARIANT_TYPE ("a(uso)"); table_iter_ next (&iter, &key, &value)) builder_ add (&array, "(uso)", get_xid(), get_address(), get_path());
g_variant_
while (g_hash_
{
...
g_variant_
}
return g_variant_new ("(a(uso))", &array);