Fix prevent issues
authorSunyeop Hwang <sunyeop.hwang@samsung.com>
Tue, 15 Jan 2013 14:24:11 +0000 (23:24 +0900)
committerSunyeop Hwang <sunyeop.hwang@samsung.com>
Tue, 15 Jan 2013 14:24:11 +0000 (23:24 +0900)
Change-Id: I224534e5151dc30e5c15f5f63814e089cbdc925e

setting-profile/src/setting-profile-sound-main.c
setting-profile/src/setting-profile.c
src/setting-plugin.c

index 96ca12f..239b5da 100755 (executable)
@@ -380,8 +380,10 @@ void __volume_stop_change_cb(void *data, Evas_Object *obj, void *event_info)
                        {
                                pa_tone_path = (char *)strdup(SETTING_DEFAULT_CALL_TONE);
 
-                               if(vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, pa_tone_path) < 0)
+                               if(vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, pa_tone_path) < 0) {
+                                       FREE(pa_tone_path);
                                        return;
+                               }
                        }
                        setting_profile_play_sound_origin(player, ad, __mm_player_msg_cb,
                                                        pa_tone_path,
@@ -398,8 +400,10 @@ void __volume_stop_change_cb(void *data, Evas_Object *obj, void *event_info)
                        if(pa_tone_path == NULL)
                        {
                                pa_tone_path = (char *)strdup(SETTING_DEFAULT_MSG_TONE);
-                               if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0)
+                               if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0) {
+                                       FREE(pa_tone_path);
                                        return;
+                               }
                        }
                        setting_profile_play_sound_origin(player, ad, __mm_player_msg_cb,
                                                        pa_tone_path,
index d8523e7..11644aa 100755 (executable)
@@ -556,8 +556,10 @@ static void setting_profile_ug_on_resume(ui_gadget_h ug, service_h service, void
                if((pa_tone_path == NULL) || (setting_profile_check_file_exist(profileUG, pa_tone_path) == SETTING_RETURN_FAIL))
                {
                        pa_tone_path = (char *)strdup(SETTING_DEFAULT_MSG_TONE);
-                       if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0)
+                       if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0) {
+                               FREE(pa_tone_path);
                                return;
+                       }
 
                        profileUG->data_msg_alert_tone->sub_desc = setting_file_basename(pa_tone_path);
                        elm_genlist_item_update(profileUG->data_msg_alert_tone->item);
@@ -575,8 +577,10 @@ static void setting_profile_ug_on_resume(ui_gadget_h ug, service_h service, void
                if((pa_tone_path == NULL) || (setting_profile_check_file_exist(profileUG, pa_tone_path) == SETTING_RETURN_FAIL))
                {
                        pa_tone_path = (char *)strdup(SETTING_DEFAULT_MSG_TONE);
-                       if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0)
+                       if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0) {
+                               FREE(pa_tone_path);
                                return;
+                       }
                        profileUG->data_email_alert_tone->sub_desc = setting_file_basename(pa_tone_path);
                        elm_genlist_item_update(profileUG->data_email_alert_tone->item);
                }
index ee3570f..feaa148 100755 (executable)
@@ -1011,17 +1011,6 @@ static void* editbox_func(void *data, xmlNode *xmlObj)
 
        }
 #endif
-       if (list_item)
-       {
-               list_item->userdata = ad;
-               list_item->isSinglelineFlag = TRUE;
-               //list_item->start_change_cb = (setting_call_back_func)__entry_key_down_cb;
-               //list_item->stop_change_cb = __entry_unfocus_cb;
-               //list_item->maxlength_reached_cb = __max_len_reached;
-               list_item->x_callback_cb = _input_panel_event_cb;
-               //list_item->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Accept_Set));
-       }
-
        if (list_item) {
                list_item->userdata = xmlObj;
                list_item->stop_change_cb = __entry_unfocus_cb;