X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=client-src%2Fclient_util.c;h=d7387e852b4ebf84f4f66474db6a53539ac27fb9;hb=f683a8b03525dccbd0576d44acd11d3ab0efee44;hp=a350aa0e76cc4030c02835167783728dfcab3a49;hpb=d5853102f67d85d8e169f9dbe973ad573306c215;p=debian%2Famanda diff --git a/client-src/client_util.c b/client-src/client_util.c index a350aa0..d7387e8 100644 --- a/client-src/client_util.c +++ b/client-src/client_util.c @@ -66,6 +66,13 @@ fixup_relative( return newname; } +/* GDestroyFunc for a hash table whose values are GSLists contianing malloc'd + * strings */ +static void +destroy_slist_free_full(gpointer list) { + slist_free_full((GSList *)list, g_free); +} + static char * get_name( @@ -706,8 +713,7 @@ application_property_add_to_argv( } } - g_hash_table_foreach(dle->application_property, - &proplist_add_to_argv, argv_ptr); + property_add_to_argv(argv_ptr, dle->application_property); return; } @@ -1009,7 +1015,8 @@ run_client_script( script->result = g_new0(client_script_result_t, 1); script->result->proplist = - g_hash_table_new_full(g_str_hash, g_str_equal, NULL, NULL); + g_hash_table_new_full(g_str_hash, g_str_equal, + &g_free, &destroy_slist_free_full); script->result->output = g_ptr_array_new(); script->result->err = g_ptr_array_new();