Code review comment for lp:~charlesk/indicator-appmenu/fix-953479

Revision history for this message
Allison Karlitskaya (desrt) wrote :

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);
g_variant_builder_init (&array, G_VARIANT_TYPE ("a(uso)");
while (g_hash_table_iter_next (&iter, &key, &value))
  {
    ...
    g_variant_builder_add (&array, "(uso)", get_xid(), get_address(), get_path());
  }
return g_variant_new ("(a(uso))", &array);

review: Approve

« Back to merge proposal