From 5ddfeecc79d4eac1f9829993cd65896cafea6ff2 Mon Sep 17 00:00:00 2001 From: Sunyeop Hwang Date: Tue, 15 Jan 2013 23:24:11 +0900 Subject: [PATCH] Fix prevent issues Change-Id: I224534e5151dc30e5c15f5f63814e089cbdc925e --- setting-profile/src/setting-profile-sound-main.c | 8 ++++++-- setting-profile/src/setting-profile.c | 8 ++++++-- src/setting-plugin.c | 11 ----------- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/setting-profile/src/setting-profile-sound-main.c b/setting-profile/src/setting-profile-sound-main.c index 96ca12f..239b5da 100755 --- a/setting-profile/src/setting-profile-sound-main.c +++ b/setting-profile/src/setting-profile-sound-main.c @@ -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, diff --git a/setting-profile/src/setting-profile.c b/setting-profile/src/setting-profile.c index d8523e7..11644aa 100755 --- a/setting-profile/src/setting-profile.c +++ b/setting-profile/src/setting-profile.c @@ -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); } diff --git a/src/setting-plugin.c b/src/setting-plugin.c index ee3570f..feaa148 100755 --- a/src/setting-plugin.c +++ b/src/setting-plugin.c @@ -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; -- 2.7.4