diff options
author | Ted Gould <ted@gould.cx> | 2011-02-08 08:23:58 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-02-08 08:23:58 -0600 |
commit | 7a787b6d5cc1427cb309f3b1bfd246f3f02f7ee5 (patch) | |
tree | dfa2b322926548ff9acafcf112cdac7d240f743e /libdbusmenu-glib/server.c | |
parent | a7a9436eab6dab746787cb6550cf3e82a5801cd8 (diff) | |
download | libdbusmenu-7a787b6d5cc1427cb309f3b1bfd246f3f02f7ee5.tar.gz libdbusmenu-7a787b6d5cc1427cb309f3b1bfd246f3f02f7ee5.tar.bz2 libdbusmenu-7a787b6d5cc1427cb309f3b1bfd246f3f02f7ee5.zip |
Fleshing out the teardown of the array
Diffstat (limited to 'libdbusmenu-glib/server.c')
-rw-r--r-- | libdbusmenu-glib/server.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index aafff11..0189b35 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -665,6 +665,22 @@ struct _prop_idle_prop_t { static void prop_array_teardown (GArray * prop_array) { + int i, j; + + for (i = 0; i < prop_array->len; i++) { + prop_idle_item_t * iitem = &g_array_index(prop_array, prop_idle_item_t, i); + + for (j = 0; j < iitem->array->len; j++) { + prop_idle_prop_t * iprop = &g_array_index(iitem->array, prop_idle_prop_t, j); + + g_free(iprop->property); + g_variant_unref(iprop->variant); + } + + g_array_free(iitem->array, TRUE); + } + + g_array_free(prop_array, TRUE); return; } |