Fix issues reported by static analyzer 50/257950/1 accepted/tizen_6.5_unified accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_8.0_unified accepted/tizen_unified tizen tizen_6.5 tizen_7.0 tizen_7.0_hotfix tizen_8.0 accepted/tizen/6.5/unified/20211028.093125 accepted/tizen/7.0/unified/20221110.063507 accepted/tizen/7.0/unified/hotfix/20221116.104311 accepted/tizen/8.0/unified/20231005.092359 accepted/tizen/unified/20210617.124845 submit/tizen/20210617.022028 submit/tizen_6.5/20211028.161201 tizen_6.5.m2_release tizen_7.0_m2_release tizen_8.0_m2_release
authorYu <jiung.yu@samsung.com>
Fri, 7 May 2021 04:22:30 +0000 (13:22 +0900)
committerYu <jiung.yu@samsung.com>
Fri, 7 May 2021 04:22:30 +0000 (13:22 +0900)
Change-Id: Ib90660769c946a2e6b5e43611fa50be5226f4052

packaging/ug-setting-wifidirect-efl.spec
ug-wifidirect/src/wfd_ug.c

index 32588df..4e1b48b 100644 (file)
@@ -1,6 +1,6 @@
 Name:       ug-setting-wifidirect-efl
 Summary:    Wi-Fi Direct setting UI gadget
-Version:    1.12.1
+Version:    1.12.2
 Release:    1
 Group:      Applications/Network
 License:    Flora-1.1
index cd21c29..cee643e 100644 (file)
@@ -310,15 +310,15 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                if (ret == APP_CONTROL_ERROR_NONE && wfds) {
                        DBG_SECURE(LOG_INFO, "Wfds name: %s", wfds);
                        ugd->wfds = strdup(wfds);
-                       WFD_IF_FREE_MEM(wfds);
                }
+               WFD_IF_FREE_MEM(wfds);
 
                ret = app_control_get_extra_data(control, "viewtype", &viewtype);
                if (ret == APP_CONTROL_ERROR_NONE && viewtype) {
                        DBG(LOG_INFO, "viewtype: %s\n", viewtype);
                        ugd->view_type = strdup(viewtype);
-                       WFD_IF_FREE_MEM(viewtype);
                }
+               WFD_IF_FREE_MEM(viewtype);
 
                /*
                * get the device filter
@@ -351,9 +351,8 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                                ugd->device_filter = WFD_DEVICE_TYPE_AUDIO;
                        else
                                ugd->device_filter = WFD_DEVICE_TYPE_OTHER;
-
-                       WFD_IF_FREE_MEM(device_filter);
                }
+               WFD_IF_FREE_MEM(device_filter);
 
                /*
                * get whether support auto exit after connection
@@ -366,9 +365,8 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                                ugd->is_auto_exit = true;
                        else
                                ugd->is_auto_exit = false;
-
-                       WFD_IF_FREE_MEM(auto_exit);
                }
+               WFD_IF_FREE_MEM(auto_exit);
 
                /*
                * get whether support multi connection,
@@ -381,9 +379,8 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                                ugd->is_multi_connect = false;
                        else
                                ugd->is_multi_connect = true;
-
-                       WFD_IF_FREE_MEM(multi_connect);
                }
+               WFD_IF_FREE_MEM(multi_connect);
 
                /*
                * get the title of UG
@@ -394,8 +391,8 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                        DBG(LOG_INFO, "Title of UG: %s", title);
                        WFD_IF_FREE_MEM(ugd->title);
                        ugd->title = strdup(title);
-                       WFD_IF_FREE_MEM(title);
                }
+               WFD_IF_FREE_MEM(title);
        }
 
        if (mode == UG_MODE_FULLVIEW)