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);
« Back to merge proposal
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);