if (!group) {
msgr("groups is null");
break;
- }
- companion_group_information_get_type(group, &type);
+ }
+ companion_group_information_get_type(group, &type);
companion_group_information_get_uri_path(group, &uri);
companion_group_information_get_resource_type(group, &rt);
msgb("[%d] type: %s, URI: %s RT: %s", i+1, comp_group_type_to_string(type), uri, rt);
return RET_SUCCESS;
}
+static void _destroy_comp_group_info(gpointer data)
+{
+ companion_group_information_destroy((companion_group_h)data);
+}
+
static int run_group_get_found(MManager *mm, struct menu_data *menu)
{
int ret;
return RET_FAILURE;
}
msg(" - companion_group_get_found_groups() ret: [0x%X] [%s]", ret, comp_error_to_string(ret));
- found_group_list = NULL;
+
+ if (found_group_list) {
+ g_list_free_full(found_group_list, _destroy_comp_group_info);
+ found_group_list = NULL;
+ }
for (int i = 0; i < count; i++) {
companion_group_type_e type;
msgb("Find Group Finished = %d", result);
}
-static void _destroy_comp_group_info(gpointer data)
-{
- companion_group_information_destroy((companion_group_h)data);
-}
-
static int run_group_find(MManager *mm, struct menu_data *menu)
{
int ret;