diff options
author | kiso.chang <kiso.chang@samsung.com> | 2021-05-11 16:26:10 +0900 |
---|---|---|
committer | kiso.chang <kiso.chang@samsung.com> | 2021-05-11 16:27:20 +0900 |
commit | 2ad311b211dac9749e6d08335395af59cc448143 (patch) | |
tree | 515159481b92672669a5ad392d02413a1ded30ef | |
parent | 8a1bb55c4857c77c75220e3584b69b0ef8268c5f (diff) | |
download | settings-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-x | setting-display/src/setting-display-main.c | 6 |
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); |