From 3b50ff69d0e4c9fe7d3566a185af63dc31b2d24f Mon Sep 17 00:00:00 2001 From: "saerome.kim" Date: Mon, 30 Apr 2018 19:55:41 +0900 Subject: [PATCH] test: fixed accumulated group resource when we calld 'find group' more than one. Signed-off-by: saerome.kim --- capi/test/mdg-manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; } -- 2.7.4