From 91853df91bcbe21e3cb71e31e1280566e7c8eadc Mon Sep 17 00:00:00 2001 From: hyunho Date: Tue, 8 Sep 2020 09:24:08 +0900 Subject: [PATCH] Fix argv free position Free before check return value so that it can be freed if its return value is error value. Change-Id: I49dd1aa6052c22a70c573d2e95312474f66d8aa5 Signed-off-by: hyunho --- test/unit_tests/test_widget_app.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit_tests/test_widget_app.cc b/test/unit_tests/test_widget_app.cc index 3591adf..3b3d2dc 100644 --- a/test/unit_tests/test_widget_app.cc +++ b/test/unit_tests/test_widget_app.cc @@ -270,8 +270,8 @@ TEST_F(WidgetAppTest, widget_app_main) { appcore_multiwindow_base_instance_exit(_)).Times(2); ret = widget_app_main(argc, argv, &callback, nullptr); - EXPECT_EQ(WIDGET_ERROR_NONE, ret); bundle_free_exported_argv(argc, &argv); + EXPECT_EQ(WIDGET_ERROR_NONE, ret); } TEST_F(WidgetAppTest, widget_app_exit) { @@ -464,8 +464,8 @@ TEST_F(WidgetAppTest, widget_app_class_add) { callback.terminate = __app_terminate_cb; ret = widget_app_main(argc, argv, &callback, nullptr); - EXPECT_EQ(WIDGET_ERROR_NONE, ret); bundle_free_exported_argv(argc, &argv); + EXPECT_EQ(WIDGET_ERROR_NONE, ret); } TEST_F(WidgetAppTest, widget_app_get_elm_win_negative) { -- 2.7.4