summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkiso.chang <kiso.chang@samsung.com>2021-07-06 16:53:22 +0900
committerkiso.chang <kiso.chang@samsung.com>2021-07-06 16:54:48 +0900
commit072240b4b29247a8d697e0b5381813e703a8af9a (patch)
treed7448f7fee7697f17e4d20fde3b4c982bb754e3c
parent0f2062f853f1dd515636fc922ed778a5928421df (diff)
downloadsettings-072240b4b29247a8d697e0b5381813e703a8af9a.tar.gz
settings-072240b4b29247a8d697e0b5381813e703a8af9a.tar.bz2
settings-072240b4b29247a8d697e0b5381813e703a8af9a.zip
- fix covirity issues Change-Id: I1c8c7fe8bff14acb0c5acabea3c599a65cfd0fb3 Signed-off-by: kiso.chang <kiso.chang@samsung.com>
-rwxr-xr-xsetting-display/src/setting-display-main.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/setting-display/src/setting-display-main.c b/setting-display/src/setting-display-main.c
index c0da364..c17e347 100755
--- a/setting-display/src/setting-display-main.c
+++ b/setting-display/src/setting-display-main.c
@@ -58,6 +58,9 @@ static char *get_current_theme_str()
{
SETTING_TRACE_BEGIN;
+ if (!setting_display_theme_change_is_supported())
+ return (char *)g_strdup(_("IDS_ST_HEADER_UNAVAILABLE"));
+
theme_loader_h tl_handle;
int result = theme_loader_create(&tl_handle);
if(result != THEME_MANAGER_ERROR_NONE){
@@ -687,13 +690,7 @@ static int setting_display_main_create(void *cb)
NULL);
/* THEME */
- char *pa_theme = "theme 1";
- if (setting_display_theme_change_is_supported())
- pa_theme = get_current_theme_str();
- else
- pa_theme = g_strdup(_("IDS_ST_HEADER_UNAVAILABLE"));
-
-
+ char *pa_theme = get_current_theme_str();
ad->data_theme =
setting_create_Gendial_field_def(
ad->md.genlist,
@@ -704,6 +701,7 @@ static int setting_display_main_create(void *cb)
0, KeyStr_Theme,
pa_theme,
NULL);
+ FREE(pa_theme);
if (ad->data_theme) {
if (!setting_display_theme_change_is_supported())