Fic coverity warning 04/213004/1 accepted/tizen/unified/20190830.110707 submit/tizen/20190829.085822
authorKiseok Chang <kiso.chang@samsung.com>
Thu, 29 Aug 2019 07:18:35 +0000 (16:18 +0900)
committerKiseok Chang <kiso.chang@samsung.com>
Thu, 29 Aug 2019 07:18:58 +0000 (16:18 +0900)
Change-Id: I1a683c4e731523abb6a251327cc154ad93b6f3f0
Signed-off-by: Kiseok Chang <kiso.chang@samsung.com>
setting-profile/src/setting-profile-sound-main.c
setting-storage/src/setting-storage-applications.c
setting-storage/src/setting-storage-miscellaneous.c
setting-storage/src/setting-storage-utils.c
setting-time/src/setting-time-main.c

index 9bf220e4da51d8760485317629901e1234eb13c0..28ec4175956ac6ff028c36a79a645f69a42c4514 100755 (executable)
@@ -1220,9 +1220,11 @@ static char *_prepare_ringtone_path(char *vconf, system_settings_key_e key,
                ret = system_settings_get_value_string(key, &pa_cur_ringtone);
                if (ret != SYSTEM_SETTINGS_ERROR_NONE) {
                        SETTING_TRACE_ERROR("system_settings_get_value_string() failed. Error: %s", get_error_message(ret));
+                       FREE(vconf_ringtone);
                        return NULL;
                }
        }
+       FREE(vconf_ringtone);
 
        if (pa_cur_ringtone == NULL) {
                if (isEmulBin())
@@ -1230,8 +1232,6 @@ static char *_prepare_ringtone_path(char *vconf, system_settings_key_e key,
                else
                        pa_cur_ringtone = strdup(default_arm);
        }
-
-
        return pa_cur_ringtone;
 }
 
index ab0052546c5d9c3b21700de699cce09fa9a80477..f11320219c7a8dbb722ab6e54746c3c5a91a0639 100755 (executable)
@@ -881,6 +881,7 @@ static void _move_to_sd(SettingStorage *ad)
 
                it = elm_genlist_item_next_get(it);
        }
+       package_manager_request_destroy(request);
 
        _update_ui_list(ad);
 
index a29c261ec0bfa45ed86e742cad603a7058761b2b..c1de84cdd910b594ba16223ccff24b80d860fb5b 100755 (executable)
@@ -291,7 +291,9 @@ static bool __media_item_cb(media_info_h media, void *data)
        if (node) {
                media_info_get_media_id(media, &node->id);
                node->size_str = strdup(file_path);
-               media_info_get_display_name(media, &node->name);
+               ret = media_info_get_display_name(media, &node->name);
+               if(MEDIA_CONTENT_ERROR_NONE != ret)
+                       node->name = strdup("");
                media_info_get_size(media, &node->size);
                media_info_get_added_time(media, &node->added_time);
                ad->data_list = eina_list_append(ad->data_list, node);
index 907f967a9698d179a78e7027e25e5bd47d412997..14ded1991f9be1ef16d247f1d8b8be57d9d70739 100755 (executable)
@@ -139,8 +139,12 @@ static bool storage_get_misces_item(media_info_h media, void *data)
        retv_if(NULL == media, true);
        retv_if(NULL == data, false);
        char *file_path = NULL;
-       media_info_get_file_path(media, &file_path);
-       if (!ecore_file_exists(file_path)) {
+       int ret = media_info_get_file_path(media, &file_path);
+       if (MEDIA_CONTENT_ERROR_NONE != ret){
+               SETTING_TRACE_DEBUG("media_info_get_file_path error : %s", get_error_message(ret));
+               return true;
+       }
+       if(!ecore_file_exists(file_path)) {
                SETTING_TRACE_DEBUG("!ecore_file_exists(file_path)");
                FREE(file_path);
                return true;
index 8204f5a966efe7e38586c0438f76009aa468a48c..bdd5d872308b907dcc39f7c50391aded88192891 100755 (executable)
@@ -240,7 +240,12 @@ static void __update_time_via_sim_card(void *data)
        ret += vconf_get_int(VCONFKEY_TELEPHONY_NITZ_GMT, &t_nitz);
        ret += vconf_get_int(VCONFKEY_TELEPHONY_NITZ_EVENT_GMT, &t_offset);
        char *tzpath = vconf_get_str(VCONFKEY_TELEPHONY_NITZ_ZONE);
-       ret_if(ret != 0 || isEmptyStr(tzpath));
+       ret_if(ret != 0 || NULL == tzpath);
+       if(isEmptyStr(tzpath)) {
+               FREE(tzpath);
+               return;
+       }
+
        ret = 0;        /*reset.. */
 
        /* a.time zone */
@@ -378,7 +383,7 @@ static void __sim_time_info_chg_cb(keynode_t *key, void *data)
                                        elm_object_item_disabled_set(ad->data_tz->item, EINA_FALSE);
                                if (ad->data_time)
                                        elm_object_item_disabled_set(ad->data_time->item, EINA_FALSE);
-
+                               FREE(tzpath);
                                return;
                        }
                        FREE(tzpath);