summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkiso.chang <kiso.chang@samsung.com>2021-05-11 16:26:10 +0900
committerkiso.chang <kiso.chang@samsung.com>2021-05-11 16:27:20 +0900
commit2ad311b211dac9749e6d08335395af59cc448143 (patch)
tree515159481b92672669a5ad392d02413a1ded30ef
parent8a1bb55c4857c77c75220e3584b69b0ef8268c5f (diff)
downloadsettings-2ad311b211dac9749e6d08335395af59cc448143.tar.gz
settings-2ad311b211dac9749e6d08335395af59cc448143.tar.bz2
settings-2ad311b211dac9749e6d08335395af59cc448143.zip
Fix Memory Leaks
- free theme_tile allocated in theme_get_title() Change-Id: If324d541610534e05e48c70d9889e1afe03aae3b Signed-off-by: kiso.chang <kiso.chang@samsung.com>
-rwxr-xr-xsetting-display/src/setting-display-main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/setting-display/src/setting-display-main.c b/setting-display/src/setting-display-main.c
index dbb39f3..c0da364 100755
--- a/setting-display/src/setting-display-main.c
+++ b/setting-display/src/setting-display-main.c
@@ -80,6 +80,7 @@ static char *get_current_theme_str()
result = theme_get_title(t_handle, &theme_title);
if(result == THEME_MANAGER_ERROR_NONE){
SETTING_TRACE_DEBUG("%d's title : %s", i, theme_title);
+ free(theme_title);
}
theme_destroy(t_handle);
}
@@ -121,7 +122,7 @@ static char *get_current_theme_str()
theme_destroy(t_handle);
theme_loader_destroy(tl_handle);
- return (char *)g_strdup(theme_title);
+ return theme_title;
}
setting_view setting_view_display_main = {
@@ -567,6 +568,7 @@ static void setting_display_theme_popup(void *data)
radio_num++;
}
+ free(theme_title);
}
theme_destroy(t_handle);
}
@@ -576,7 +578,7 @@ static void setting_display_theme_popup(void *data)
free(ids);
}
-
+ if(curtheme_title) free(curtheme_title);
theme_loader_destroy(tl_handle);