e_test_runner: added missing free for info_list. 77/84677/1
authorGwanglim Lee <gl77.lee@samsung.com>
Mon, 22 Aug 2016 04:21:02 +0000 (13:21 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 22 Aug 2016 04:21:02 +0000 (13:21 +0900)
Change-Id: Icfccb938cb8b50c5dd11a318a2b63a7f8858f05a

src/e_test_runner.c

index 07c58cb..a77c1a0 100644 (file)
@@ -350,8 +350,10 @@ e_test_runner_req_win_info_list_get(E_Test_Runner *runner)
 {
    Eldbus_Pending *p;
    Window_Info_List *info_list = NULL;
+   Eina_List *list = NULL;
 
    info_list = E_NEW(Window_Info_List, 1);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(info_list, NULL);
 
    while (info_list)
      {
@@ -381,7 +383,10 @@ e_test_runner_req_win_info_list_get(E_Test_Runner *runner)
         break;
      }
 
-   return info_list->list;
+   list = eina_list_clone(info_list->list);
+   E_FREE(info_list);
+
+   return list;
 }
 
 Eina_Bool