Add free memory allocated pointer. 05/212705/2 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.034607 accepted/tizen/5.5/unified/mobile/hotfix/20201027.060722 accepted/tizen/5.5/unified/wearable/hotfix/20201027.092021 accepted/tizen/unified/20190829.101433 submit/tizen/20190827.060944 submit/tizen_5.5/20191031.000009 submit/tizen_5.5/20191031.000011 submit/tizen_5.5/20191031.000013 submit/tizen_5.5_mobile_hotfix/20201026.1851010 submit/tizen_5.5_mobile_hotfix/20201027.114301 submit/tizen_5.5_wearable_hotfix/20201026.1843010 submit/tizen_5.5_wearable_hotfix/20201027.114701 tizen_5.5.m2_release
authorjinwang.an <jinwang.an@samsung.com>
Mon, 26 Aug 2019 07:20:07 +0000 (16:20 +0900)
committerjinwang.an <jinwang.an@samsung.com>
Tue, 27 Aug 2019 01:58:02 +0000 (10:58 +0900)
Change-Id: Ida50739c2597c980a3a219882e7e0d8513c62b43
Signed-off-by: jinwang.an <jinwang.an@samsung.com>
src/setting-display.c
src/setting-language.c
src/setting.c
src/util.c

index d3aedd81eeefa703ec1a4861ed2b81efcc060db8..944cddf1689e3bf542cb1b621e185d5839396462 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) 2013-2014 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * PROPRIETARY/CONFIDENTIAL
@@ -336,7 +336,6 @@ char *_gl_display_title_get(void *data, Evas_Object *obj, const char *part)
                                        snprintf(buf, sizeof(buf) - 1, "%s", curr_lang);
                                }
                        }
-                       FREE(curr_lang);
                } else if (id->item == g_screen_time_item) {
                        int time = 0;
                        vconf_get_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, &time);
@@ -361,6 +360,7 @@ char *_gl_display_title_get(void *data, Evas_Object *obj, const char *part)
                        /*snprintf(buf, sizeof(buf) - 1, "%s", _get_wake_up_gesture_sub_title()); */
                        snprintf(buf, sizeof(buf)-1, "%s", "Motion is unsupported now.");
                }
+               FREE(curr_lang);
        }
        return strdup(buf);
 }
index e1f70f171ce24d07e9aaec6e86c02081df4a7fe7..f47c19bb999a9688aad61cdd707df141565474c3 100644 (file)
@@ -341,6 +341,7 @@ Evas_Object *_gl_lang_ridio_get(void *data, Evas_Object *obj, const char *part)
                FREE(alt_lang_set2);
 
                DBG("Setting - current language is %s", (lang_set != NULL) ? lang_set : "NULL");
+               FREE(lang_set);
 
                index++;
 
index 66108a8c8f0c4df56f04a07f2726965c7331881e..5fec3aef5fdb0c0d26f1bc499bb64b978294b922 100644 (file)
@@ -643,6 +643,7 @@ static void _lang_changed(app_event_info_h event_info, void *data)
                elm_language_set(locale);
                elm_config_all_flush();
        }
+       FREE(locale);
 }
 
 static void init_values(appdata *ad)
@@ -941,6 +942,7 @@ bool app_create(void *data)
        locale = vconf_get_str(VCONFKEY_LANGSET);
        if (locale) {
                elm_language_set(locale);
+               FREE(locale);
        }
 
        ad->is_first_launch = 1;
index d173b2ccd79c61c9e72e9e6ba7108863bda3439b..e0de18ff6f205408c4ed8073d3932a52eb43774a 100644 (file)
@@ -223,6 +223,7 @@ char *_get_strnum_from_icu(int number)
        ret = i18n_unumber_create(I18N_UNUMBER_DEFAULT, NULL, -1, locale, NULL, &num_fmt);
        if (ret != I18N_ERROR_NONE) {
                ERR("INVALID_PARAMETER!!");
+               FREE(locale_tmp);
                return NULL;
        }
        i18n_unumber_format(num_fmt, number, result, len, NULL, &status);
@@ -232,6 +233,7 @@ char *_get_strnum_from_icu(int number)
        i18n_unumber_destroy(num_fmt);
 
        ret_str = strdup(res);
+       FREE(locale_tmp);
        return ret_str;
 }