From: saerome.kim Date: Mon, 30 Apr 2018 10:55:41 +0000 (+0900) Subject: test: fixed accumulated group resource when we calld 'find group' more X-Git-Tag: submit/tizen/20190131.065036~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b50ff69d0e4c9fe7d3566a185af63dc31b2d24f;p=platform%2Fcore%2Fapi%2Fmulti-device-group.git test: fixed accumulated group resource when we calld 'find group' more than one. Signed-off-by: saerome.kim --- diff --git a/capi/test/mdg-manager.c b/capi/test/mdg-manager.c index 4e4e0c4..281d7ff 100644 --- a/capi/test/mdg-manager.c +++ b/capi/test/mdg-manager.c @@ -774,6 +774,11 @@ static int run_group_find(MManager *mm, struct menu_data *menu) if (strlen(timeout)) duration = (unsigned short)strtol(timeout, NULL, 10); + if (found_group_list) { + g_list_free_full(found_group_list, _destroy_mdg_group_info); + found_group_list = NULL; + } + ret = mdg_group_find(handle, duration, _group_found_cb, _group_finish_cb, NULL); if (MDG_ERROR_NONE != ret) { msgr("Failed to Find Group: [%s(0x%X)]", mdg_error_to_string(ret), ret); @@ -781,11 +786,6 @@ static int run_group_find(MManager *mm, struct menu_data *menu) } msg(" - mdg_group_find() ret: [0x%X] [%s]", ret, mdg_error_to_string(ret)); - if (found_group_list) { - g_list_free_full(found_group_list, _destroy_mdg_group_info); - found_group_list = NULL; - } - return RET_SUCCESS; }